Give the output for the following code with reason:- function myFunction() { "use strict"; y = 3.14; } code example
Example 1: use strict javascript
function doSomething() {
'use strict';
...
}
Example 2: use strict javascript
// Non-strict code...
(function(){
"use strict";
// Define your library strictly...
})();
// Non-strict code...