Hacker News new | ask | show | jobs
by jQueryIsAwesome 4913 days ago
Maybe 10) You can't directly change the value of 'this'

    this = {};
    ReferenceError: Invalid left-hand side in assignment;
But of course you can make sure 'this' is something you expect it to be.

    if(!this.tagName){
        throw new Error("Only DOM objects can used as 'this'")
    }