5、 var s = new String("abc"); alert(typeof(s) == typeof("abc")); alert(s === "abc"); alert(s.toString() == s);
6、 var a = new Object(); a.toString = function(){return "a"}; var b = new Object(); b.toString = function(){return "b"}; alert(a>b); a.valueOf = function(){return 1}; b.valueOf = function(){return 0}; alert(a>b);
7、 function step(a) { return function(x) { return x + a++; } } var a = step(10); var b = step(20); alert(a(10)); alert(b(10));