I'm new to js and want to find a way to create Struct working in browser.A Struct should copy a new struct(not reference copy) when doing "var a = b"(b should make a copy and assign it to a).Is it possible to make a struct in js? If not how to code with type such as Point, Size.
-
Values are always assigned by value in Javascript, it doesn't matter what it is. You cannot override that behaviour with the type of object you're assigning.deceze– deceze ♦2016-05-16 07:23:34 +00:00Commented May 16, 2016 at 7:23
-
Possible duplicate of Structs in JavascriptThe Reason– The Reason2016-05-16 07:29:59 +00:00Commented May 16, 2016 at 7:29
Add a comment
|