1.在js中,return关键字能够做为一句话的结束。web
function test(){ return console.log(1); console.log(2); }
上面的代码,若是去掉return,console.log(2)才会执行。svg