1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>js代码按块编译</title> 6 </head> 7 <body> 8 9 10 <script> 11 //js代码是按块编译的,一对script代码块是一个编译单位,这一个代码块的错误不影响下个代码块的执行 12 let a = (); 13 console.log(a); 14 </script> 15 16 <script> 17 let b = 3; 18 console.log(b); 19 </script> 20 </body> 21 </html>
标签:console,log,代码,按块,js,编译 From: https://www.cnblogs.com/polin/p/17134532.html