Skip to main content

Command Palette

Search for a command to run...

"use strict" in JS

Updated
1 min read
"use strict";

var firstName = "Daniel";

function greet() {
  console.log(this.firstName);
}

greet.firstName = "Dushyanth";

greet.greeting = function () {
  console.log(this.firstName);
  function fe() {
    console.log("inside fe " + this.firstName);
  }
  fe();
  // fe.bind(this)();
};

greet.greeting();

greet();

Curious case of “use strict”

More from this blog

D

Dushyanth

18 posts