1. js中使用typeof能得到那些类型typeof undefined // undefinedtypeof ‘abc’ //stringtypeof 123 // numbertypeof true // booleantypeof {} // objecttypeof [] // objecttypeof null // objecttypeof console.log // function2. 何时使用 === 何时使用 ==判断对象属性是否存在可以使用 == ,其他情况都使用 ===if (obj.a == null) { // 这里相当于 obj.a === null || obj.a === undefined 的简写形式 // 这是jquery源码中推荐的写法}function fn(a,b) { if(a == null) { // … }}3. 发生强制类型转换的情况// 字符串拼接var a = 100 + 10; // 110var b = 100 + ‘10’; // ‘10010’var c = ‘10’ - 1; // 9// == 运算符100 == ‘100’; // true0 == ‘’; // truenull == undefined; // true// if 语句var a = 100;if (a) { … }var b = ‘’;if (b) { … }// 逻辑运算console.log(10 && 0); // 0console.log(’’ || ‘abc’); // ‘abc’console.log(!window.abc); // true// 判断一个变量会被当做 true 还是 falsevar a = 100;console.log(!!a);if条件里,只有以下情况为false0 ’’ null undefined NaN false4. js中有哪些内置函数 - 数据封装类对象ObjectArrayBooleanNumberStringFunctionDateRegExpError5. js变量按照存储方式区分为那些类型,描述一下特点值类型 number string boolean引用类型 object function// 值类型var a = 1;var b = a; // 赋值之后不会相互干涉a = 2;console.log(b); // 1// 引用类型var obj1 = {x:1};var obj2 = obj1; // 变量指针的赋值,不是真正的拷贝obj1.x = 2; // 值的修改会相互干预console.log(obj2.x); // 26. 如何理解JSONJSON 只不过是一个 js 对象而已,它也是一种数据格式JSON.stringify({a:10, b:20});JSON.parse(’{a:10, b:20}’);