3. Zakas的小问题
• var num1 = 5,
num2 = 10,
result = num1+++num2;
• Q:
What is the value of result?
What is the value of num1?
What is the value of num2?
http://www.nczonline.net/blog/2010/02/16/my-javascript-quiz/
4. • var x = 5,
o={
x: 10,
doIt: function doIt(){
var x = 20;
setTimeout(function(){
alert(this.x);
}, 10);
}
};
o.doIt();
• Q:
What value is displayed in the alert?
5. • var num1 = "10",
num2 = "9";
• Q:
What is the value of num1 < num2?
What is the value of +num1 < num2?
What is the value of num1 + num2?
What is the value of +num1 + num2?