+ 1
How this code is not giving any error?
class Myclass: pass obj=Myclass() obj.n=1000 print (obj.n) As there is no attribute n how can this work
1 Answer
+ 2
You can do similar thing in JS. It's called monkey patching https://stackoverflow.com/questions/5626193/what-is-monkey-patching.