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.

2
  • 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. Commented May 16, 2016 at 7:23
  • Possible duplicate of Structs in Javascript Commented May 16, 2016 at 7:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.