Hacker News new | ask | show | jobs
by pcwalton 3644 days ago
You can generally do that in JS as well. (Added properties are sometimes called "expandos".)
1 comments

True. Just find out. But Chrome's console yield undefined to me...Weird.

Edit: find the reason. It is because I am trying to assign a property to int. Seems JS won't allow this to primitive type?

Edit: Python won't allow assignment to primitive type bject either. The handling is the same.