渡一教育公开课web前端开发JavaScript精英课学习笔记(十一)try……catch……和 ES5的严格模式

try……catch…… <script type = "text/javascript"> try{ //正在执行的代码,若是出错会终止执行,转到执行catch中的代码 console.log('a'); console.log(b); console.log('c'); }catch(e){ // e 表明捕捉到的错误对象Error,名称可随意起
相关文章
相关标签/搜索