Click here to Skip to main content
15,897,187 members
Articles / Programming Languages / Javascript

How to use Javascript as OOPS for beginner

Rate me:
Please Sign up or sign in to vote.
5.00/5 (5 votes)
22 Nov 2010CPOL 17.2K   5  
From what I understand of best practices in the JS world, one should not use the new keyword very often.For this example, I would suggest this as an alternate approach:Create a new script file arithmetic.jsvar Arithmetic = function(){ var obj = { add: function(a,b) { return a +...
No downloads associated with this content

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Norway Norway
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions