Re:A re-introduction to JavaScript
by reipahb on Saturday May 09, 2015 @12:28PM
(#9516812)
Actually, what you get when referencing x.test in Python is a bound method:
I really like this behavior in Python. Unfortunately, JavaScript does not behave the same way, as you see in the last couple of lines in your example. You can however get the same result by manually binding the method to the object:
[ Parent
| on HN ]
There are no comments on this comment yet.