Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript Strict Mode in Function

myVariable = 9;
console.log(myVariable); // 9

function hello() {

    // applicable only for this function
    'use strict';

    string = 'hello'; // throws an error
}

hello();
 
PREVIOUS NEXT
Tagged: #javascript #Strict #Mode #Function
ADD COMMENT
Topic
Name
8+1 =