0

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 May 16 '16 at 07:23
  • Possible duplicate of [Structs in Javascript](http://stackoverflow.com/questions/502366/structs-in-javascript) – The Reason May 16 '16 at 07:29

0 Answers0