Skip to content

Instantly share code, notes, and snippets.

@christianbundy
Created May 10, 2014 22:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianbundy/0828eb7114383ee3dd9c to your computer and use it in GitHub Desktop.
Save christianbundy/0828eb7114383ee3dd9c to your computer and use it in GitHub Desktop.
// Gaslighting With Javascript
(function () {
var obj = {
fn : function () {}
, num: 1
, obj: {}
, str: 'Hello, world!'
};
console.log(typeof obj.f‌n), // undefined
console.log(typeof obj.nu‌m); // undefined
console.log(typeof obj.o‌bj); // undefined
console.log(typeof obj.st‌r); // undefined
console.log(typeof ob‌j); // undefined
return obj;
})();
@linuxenko
Copy link

Haha, it's confusing a little bit ))
There is invisible (inside of console.log) character: "< 200c >" // withoyt white spaces ))

console.log(typeof ob< 200c >j);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment