javascript - Ruby toplevel == JS global object? -


coming ruby js, think it'd easy learn if compare , contrast between two. when stumbled ruby toplevel can't think of similar global object (window object) in javascript.

am correct in making assumption?

it's not similar in meaningful way except both objects act this/self outside context of other object. in other respect, quite different. there no useful way refer main outside of top level there window. global variables true global variables, , constants or methods defined in context of main not defined on main, on object class.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -