导航
var 1 = 1;
var 1ab = 1;
var a = 1 = 2;



变量 or 函数未被声明
test();
console.log(a);


var a = 1;
console.log(a) = 1;

数组长度设置负值
var arr = [1, 2, 3];
arr.length = -1;

对象方法参数,超出可行范围
var num = new Number(66.66);
console.log(num.toFixed(-1));

在调用前先会判断被调用者类型是否正确
123();

var obj = {};
obj.say();

实例化一个不是构造器的类型
var a = new 'string';
var b = new [];



var myUrl = '<https://www.baidu.com?name=张大彪>';
var newUrl = encodeURI(myUrl); // 会把url中的中文转为中文编码字符
console.log(newUrl); // <https://www.baidu.com?name=%E5%BC%A0%E5%A4%A7%E5%BD%AA>

var myUrl = '张大彪';
var newUrl = encodeURI(myUrl); // 也能转换,因为是转成URI资源标识,就是个名字,不一定得是网址
console.log(newUrl);

var myUrl = '张大彪';
var newUrl = encodeURI(myUrl);
console.log(newUrl); // %E5%BC%A0%E5%A4%A7%E5%BD%AA
var recoverUrl = decodeURI(newUrl);
console.log(recoverUrl); // 张大彪

var str = decodeURI('asdn%alasng');

eval('var a = 1; console.log(a)');

var obj = {
a: 1,
b: 2
}
console.log(eval('obj'));
console.log(eval(obj))

var err = new Error('代码错误');
console.log(err);
var err1 = new SyntaxError('代码错误了');
console.log(err1);
var err = new TypeError('type 错误');
