"Line Breaking" with "use strict" - Javascript Language Basics

Javascript examples for Language Basics:use strict

Description

"Line Breaking" with "use strict"

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Strict Mode and ASI</title> 
   </head> 
   <body> 
      <script>
(function() {/* w  w w.j a va 2 s.c  om*/
  "use strict";
  console.log(foo());
  function foo() {
    var a = 1, b = 2;
    return
    a + b;
  }
})();

      </script>  
   </body>
</html>

Related Tutorials