Click here to Skip to main content
15,891,951 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 17K   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 +...

Views

Daily Counts

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