3 ms·
Your example is not equivalent to the Ruby code. You’re just assigning a value to a property which is always exposed, you’re showing getters/setters. The instan
by rubyn00bie 3y ago
Your example is not equivalent to the Ruby code. You’re just assigning a value to a property which is always exposed, you’re showing getters/setters. The instance variables are not by default exposed or accessible outside the class/object.
- danielheath 3y agoOn the other hand... foo = {bar: "123"}; with (foo) eval("console.log(bar)")