1.toString() 结果是多少?

下面代码结果多少?

var a = 1 function fn() { a++ console.log(a) var a = 1 console.log(a) } fn()

下面代码结果多少?

const f = function fn(){ console.log(1) } fn()

下面代码结果多少?

console.log(fn()) function fn() { return 1 } function fn() { var test = function() { return 2 } return test() var test = function() { return 3 } }

下面代码结果多少?

function fn(a, b, c) { a = 2 b = 3 c = 4 delete a arguments[0] = 5 delete arguments[1] arguments[1] = 6 return [a, b, c, arguments[0], arguments[1], arguments[2]] } console.log(fn(1, 1))

下面代码结果多少?

function fn(a) { 'use strict' a = 2 arguments[0] = 3 return [a, arguments[0]] } console.log(fn(1))

下面代码结果多少?

function F() {} var f = new F() F.prototype.fn = function test() {} console.log(f.constructor) F.prototype = {} f = new F() console.log(f.constructor) F.prototype = { constructor: F } f = new F() console.log(f.constructor)

下面代码结果多少?

Array.prototype.toString = function() { return 'a' } Array.prototype.join = function() { return 'b' } console.log([10,1] == '10,1')

下面代码结果多少?

function fn() { console.log(this) } const o1 = { x: fn } const o2 = { x: o1 } o2.x.x()

下面代码结果多少?

function F() {} F.prototype.test = function() { function fn() { console.log(this == a) } fn() } new F().test()

下面代码结果多少?

const f = { x: function() { console.log(this == f) } } f.x() const a = f.x a()

下面代码结果多少?

const o = { hasOwnProperty: function() { return false; }, a: 'xx' } console.log(o.hasOwnProperty('a')) console.log(({}).hasOwnProperty.call(o, 'a'))

下面代码结果多少?

const a = [] a[0] = 'a' a[1] = 'b' a['2'] = 'c' a[-1] = 'd' a.x = 'e' console.log(a.length)

下面代码结果多少?

const a = [1, 2, 3] a.length = 2 console.log('2' in a)

下面代码结果多少?

var f = 1 function fn() { f = 2 return function f() {} } fn() console.log(f)

下面代码结果多少?

{a: 1} + '2'

下面代码结果多少?

{a: 1, b: 2}

下面代码结果多少?

[true, false][+true, +false]

下面代码结果多少?

'use strict' function F(){ console.log(this) } F() new F()

下面代码结果多少?

document.body.addEventListener('click', f.bind(this)) function f() { console.log(this) }

下面代码结果多少?

const a = Object.create(null) console.log(a + '')

下面代码结果多少?

Math.max.apply(null, {'0':1, '1':2, length:1}) Math.min.apply(null, {'0':1, '-1':-1, length:2})

下面代码结果多少?

const a = 12.345 a.toFixed(22) a.toFixed(-1)

下面代码结果多少?

parseInt(' 01 2') parseInt(010, 8) parseFloat('1.0')

下面代码结果多少?

console.log([1,2,3].indexOf(1,2)) console.log((function(a, b = 1, c) {}).length)

下面代码结果多少?

var a = 1 console.log(typeof a) (function a () {})() console.log(typeof a) a = function a() {} console.log(typeof a)

下面代码结果多少?

[NaN].includes(NaN)

下面代码结果多少?

const a = Number.MAX_SAFE_INTEGER const b = Number.MIN_SAFE_INTEGER console.log(a + 1 == a + 2) console.log(a + 1 == a + 3) console.log(b - 1 == b - 2) console.log(b - 1 == b - 3)

下面代码结果多少?

console.log(typeof 12n) console.log(12n == 12) const a = BigInt(Number.MAX_SAFE_INTEGER) console.log(a + 1n == a + 2n) console.log(a + 1)

下面代码结果多少?

const str = '一、二' console.log(str.split('、')) console.log(str.split(/(、)/))

下面代码结果多少?

var a = {x: 1} var b = a a.x = a = {x: 2} console.log(a.x) console.log(b.x) var a = {x: 1} var b = a a.x = a a = {x: 2} console.log(a.x) console.log(b.x) var a = [1] var b = a a[0] = a = [2] console.log(a[0]) console.log(b[0])

下面代码结果多少?

'use strict' Function.apply.bind(function(x) { console.log(this, x) }, null)({ 0: 1, length: 1 })

下面代码结果多少?

// t.js export async function then(r) { r() console.log(1) } import * as t1 from './t.js' import('./t.js').then((t2) => { console.log(t1 === t2) })