You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ deno run /Users/michael/sandbox/sm1/spec/js-dis/const.js
2
1
0
Might be useful to note that when the last line is un-commented, Deno complains that i is not defined at that line, whereas Rhino prints 2. However, if i is defined as let, Rhino behaves like Deno, and complains that i is not defined.
Seems like Rhino defines consts on a parent scope of the correct scope (maybe where vars would have been defined?), but I'm no expert in Rhino's internals.
The text was updated successfully, but these errors were encountered:
Given the following code, Rhino and Deno print different outputs. (the
out
function is just a compatibility layer between the two engines):Rhino prints:
While Deno prints:
Might be useful to note that when the last line is un-commented, Deno complains that
i
is not defined at that line, whereas Rhino prints2
. However, ifi
is defined aslet
, Rhino behaves like Deno, and complains thati
is not defined.Seems like Rhino defines
const
s on a parent scope of the correct scope (maybe wherevar
s would have been defined?), but I'm no expert in Rhino's internals.The text was updated successfully, but these errors were encountered: