Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript this Inside Function with Strict Mode

'use strict';
this.name = 'Jack';
function greet() {

    // this refers to undefined
    console.log(this);
}
greet(); // undefined
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #Inside #Function #Strict #Mode
ADD COMMENT
Topic
Name
6+4 =