Preserved Topic: A variabel question |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: oslo, Norway |
posted 08-17-2001 14:44
Just wondering what variabels that is in javascript, and how does they work? |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 08-17-2001 15:22
A variable stores a single peice of information. Like, a number or a "string." I'm sure you've seen this before. For instance: |
Maniac (V) Inmate From: there...no..there..... |
posted 08-17-2001 15:26
Variables can be just about anything. They can hold any form of data that will be used in your script. Check out WebMonkey. |
Paranoid (IV) Inmate From: oslo, Norway |
posted 08-17-2001 15:26
Yes I have seen this before, but when I was programming inn Pascal and Delphi, there vas different type of variables like this |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 08-17-2001 15:35
Oh, the cool (and sometimes confusing) thing about JavaScript, is that it deals with all that stuff by itself. A variable can be any number (integer, long, double, you name it) or a string, or an object or an array. This, for example, is perfectly legal: |
Paranoid (IV) Inmate From: oslo, Norway |
posted 08-17-2001 15:43
Hmm. this is not right it. |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 08-17-2001 15:51
Yup, it is. Don't think of it as a single data type, think of it as *all* data types in one. You just never need to specify which data type you want your variable to be, because the browser running the JavaScript will figure it out on its own. |