常用的JavaScript代码调试语句有()
A: console.log()
B: alert()
C: debugge
D: try…catch
A: console.log()
B: alert()
C: debugge
D: try…catch
举一反三
- 作为调试技巧,微信小程序开发中可以用以下哪个代码输出信息到日志(log)中? A: console() B: console.print() C: console.log() D: System.out.print()
- 可以用alert()函数对JavaScript代码进行调试。
- 尝试运行的代码放在哪个语句块中( ) A: catch B: finally C: try D: try……catch
- 中国大学MOOC: 对以下代码片段作用的最准确描述是( ) try { const res = wx.getStorageInfoSync() console.log(res.keys) console.log(res.currentSize) console.log(res.limitSize)} catch (e) { // Do something when catch error}
- (()=>{letx,y;try{thrownewError();}catch(x){(x=1),(y=2);console.log(x);}console.log(x);console.log(y);})();以上代码运行结果为() A: 1undefined2 B: undefinedundefinedundefined C: 112 D: 1undefinedundefined