var temp = "<div class='cell' style='width:{width}px; height: {height}px; background-image: url(i/photo/{index}.jpg)'></div>";
var w = 1, html = '', limitItem = 49;
for (var i = 0; i < limitItem; ++i) {
w = 200 + 200 * Math.random() << 0;
html += temp.replace(/\{height\}/g, 200).replace(/\{width\}/g, w).replace("{index}", i + 1);
}
$("#freewall").html(html);
I'm not really good in Javascript bitwise operation especially the left shift operator (the <<). Can anyone explain to me why the developer uses that with Math.random() times 200 and plus 200 for the width? The code is excerpt from freewall.js example codes.