The JavaScript new operator

In the last post I was changing some C# code to JavaScript but there was one part that I just dropped and didn’t explain why, and that was the use of the new operator.
While JavaScript isn’t a classical language, it’s prototypal, and …


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail

In the last post I was changing some C# code to JavaScript but there was one part that I just dropped and didn’t explain why, and that was the use of the new operator. While JavaScript isn’t a classical language, it’s prototypal, and doesn’t have a notion of classes (yet), but it does have a new operator. What’s interesting is it’s an operator like C# (see 14.5.10 of the spec, yep I looked it up :P), and operators tend to do something unique which is also the case with JavaScript new.


This content originally appeared on Posts on LINQ to Fail and was authored by Posts on LINQ to Fail


Print Share Comment Cite Upload Translate Updates
APA

Posts on LINQ to Fail | Sciencx (2013-07-14T00:00:00+00:00) The JavaScript new operator. Retrieved from https://www.scien.cx/2013/07/14/the-javascript-new-operator/

MLA
" » The JavaScript new operator." Posts on LINQ to Fail | Sciencx - Sunday July 14, 2013, https://www.scien.cx/2013/07/14/the-javascript-new-operator/
HARVARD
Posts on LINQ to Fail | Sciencx Sunday July 14, 2013 » The JavaScript new operator., viewed ,<https://www.scien.cx/2013/07/14/the-javascript-new-operator/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » The JavaScript new operator. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2013/07/14/the-javascript-new-operator/
CHICAGO
" » The JavaScript new operator." Posts on LINQ to Fail | Sciencx - Accessed . https://www.scien.cx/2013/07/14/the-javascript-new-operator/
IEEE
" » The JavaScript new operator." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2013/07/14/the-javascript-new-operator/. [Accessed: ]
rf:citation
» The JavaScript new operator | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2013/07/14/the-javascript-new-operator/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.