const result = '6' * '6';
会发生什么?
assert.equal(result, '36')
assert.equal(result, 36)
类型错误
答案
const result = [6] * [6];
assert.equal(result, [36])
哪些表达式的结果为数字 123?
123
assert.equal(122 + true, 123)
assert.equal('122' + true, 123)
assert.equal('123' * 1, 123)
assert.equal(Number(123), 123)
assert.equal(Number('123'), 123)
==
以下哪个断言会成功?
assert.ok(5 == true)
assert.ok(5 == false)