script> let a = 10; { let a = 100; console.log(a)//(1) } console.log(a)//(2)
举一反三
- console.log(a) let a = 10
- var a = 10; { var a = 100; console.log(a)//(1) } console.log(a)//(2)
- 作为调试技巧,微信小程序开发中可以用以下哪个代码输出信息到日志(log)中? A: console() B: console.print() C: console.log() D: System.out.print()
- 中国大学MOOC:"以下代码片段运行后,在console面板显示的结果是( ) wx.onAccelerometerChange(function (res) { console.log(res.x) console.log(res.y) console.log(res.z)})";
- 已知:var test = { x1 : [1, 2, 3, 4, 5], x2 : 'hello', x3 : { y1: false, y2: null, }}以下哪句可以在Console控制台输出y1的值? A: console.log(test.x3.y1) B: console.log(test[0].x3.y1) C: console.log(x3.y1) D: console.log(y1)