DEV Community


Discussion on: Take 'this' Quiz, Understand How 'this' Works in JavaScript

chiexplores profile image
Chi • Edited

As someone who learned about the self keyword (Smalltalk) and learning about this in JS, the article helps a lot! Especially that arrow function! So does this mean that it is better to create a Class for call instead of just a block variable? That way you can instantiate the Class call.

liaowow profile image
Annie Liao Author • Edited

Glad it helps, Chi! And thanks for mentioning Smalltalk -- I had to look it up haha. I don't think there's a preferred way, it all depends on your use case. Also, JavaScript's class keyword is not really a true class as in other object-oriented languages like Smalltalk. I found this deep-dive article, hope it helps as well: