HN2new | past | comments | ask | show | jobs | submitlogin

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'")
    }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: