View Full Version : Js
basic3572002
12-22-2002, 01:06 PM
i want to know if JavaScript Supports byReferences variables, constant variables, and creating its own class object
if all one of i have said works please give me an exampol
thanks...
mordred
12-22-2002, 02:18 PM
All variables that refer to an object (such as arrays, or objects exposed by the DOM, or your own) are passed by reference. Numbers, booleans and strings are passed by value. Watch out for comparing by reference/value!
Constants are only supported in Moz/NN6+, see
http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/ident.html#1012963
There is currently no "class" concept for object-oriented programming in JavaScript. You can treat everything you work on as an object. You can define, enhance, and customize objects by changing their prototype. Basically, you create an instance of an object by using the keyword "new" or a literal.
Here's a good entry point for OOP in JS:
http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/obj.html#1008302
With that info you should be able to open your next thread with a slightly better topic than "Js". It's quite clear you're not going to ask us something about COBOL in this forum. :D
basic3572002
12-23-2002, 04:21 AM
ok thanks
ron
Originally posted by basic3572002
constant variables
Isn't that an oxymoron? ;)
krycek
12-23-2002, 01:14 PM
Originally posted by jkd
Isn't that an oxymoron? ;)
Heheh yeah... like "Microsoft Works" :D:D:D ;) lol ;)
::] krycek [::
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.