Courtesy: A Javascript conference video. I forgot the name of the conference. Will update.
var name = 'Mr. Bond';
(function(){
if(typeof name === 'undefined'){
var name = "Mr. Bond";
sayHello(name);
} else {
alert(name);
...
Wednesday, December 18, 2013
JavaScript Puzzle - 1
Courtesy: A Javascript conference video. I forgot the name of the conference. Will update.
var END = 9007199254740992; //Math.pow(2,53)
var START = END - 100;
var count = 0;
for(var i = START; i<= END; i++){
count++;
}
alert(count);
What this alerts? And, give me the reason for that.
...