无答案,只是激励自己时常复习这些知识点
1、以下代码会输出什么?为什么?
console.log(
'123abc456'.match(/[a-Z]/g)
);
2、以下代码会输出什么?为什么?
const where = "Gallifrey";
function go() {
console.log("Off to " + this.where + ", Allons-y!");
}
go();
3、以下代码会输出什么?为什么?
function hello() {
"use strict";
console.log(arguments.callee);
}
hello();
4、以下代码会输出什么?为什么?
function howMany(a=2,b,c) {}
console.log(howMany.length);
function howMany(a,b=2,c) {}
console.log(howMany.length);
function howMany(a,b,c=2) {}
console.log(howMany.length);
5、以下代码会输出什么?为什么?
0 && 2 ? console.log(1) : console.log(2);
0 && (2 ? console.log(1) : console.log(2));