espruino / Espruino

The Espruino JavaScript interpreter - Official Repo
http://www.espruino.com/
Other
2.76k stars 741 forks source link

Can't reference `Terminal.println` #2309

Closed notEvil closed 1 year ago

notEvil commented 1 year ago

Hi,

Terminal.println('this')  // shows this
var p = Terminal.println
p === Terminal.println  // true
p('this');  // shows nothing

on Bangle 1 2v16. Is this as expected?

notEvil commented 1 year ago

Seems like JS does that (doesn't bind on attribute access), coming from Python this is unexpected. Sry for the distraction!