一些javascript题目

一些javascript题目

var result = [10] + 1;
console.log(result)
var result = ['a', 'b', 'c'] + "";
console.log(result)
var result = 'a' + 5;
console.log(result)
var result = 3.75 | 0;
console.log(result)
var result = 65 / 'a';
console.log(result)
var obj = {"10": 1};
obj[10] = 2;
obj[[1, 0]] = 3;
var result = obj["10"] + obj[10] + obj[[1, 0]];
console.log(result)
var $ = {"": String};
var result = !!$[([])]();
console.log(result)
var result = (' \t\r\n ' == 0);
console.log(result)
var a = new String("123");
var b = "123";
var result = (a === b);
console.log(result)
var a = {key: 1};
var b = {key: 1};
var result = (a == b);
console.log(result)

http://blog.vjeux.com/2009/javascript/smallhash-information-compression.html

标签: javascript
posted @ 2011-03-15 09:09  awp110  阅读(167)  评论(0编辑  收藏  举报