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
There is no single correct syntax translation for properties, since properties are the same as associative array elements in v1. But in general, .z is more likely to be a property than an associative array/map element. Even if the original code used the object like a map (i.e. it used both y.z and y["z"]), adding [] won't be enough since the object isn't a Map. A more direct (but not recommended) translation would be to instead replace y["z"] with y.%"z"%, as both y.z and y.%"z"% refer to the same thing in v2, just as y.z and y["z"] did in v1.
Best to just leave it as is, I think.
The text was updated successfully, but these errors were encountered:
There is no single correct syntax translation for properties, since properties are the same as associative array elements in v1. But in general,
.z
is more likely to be a property than an associative array/map element. Even if the original code used the object like a map (i.e. it used bothy.z
andy["z"]
), adding[]
won't be enough since the object isn't a Map. A more direct (but not recommended) translation would be to instead replacey["z"]
withy.%"z"%
, as bothy.z
andy.%"z"%
refer to the same thing in v2, just asy.z
andy["z"]
did in v1.Best to just leave it as is, I think.
The text was updated successfully, but these errors were encountered: