Connecting Tech Pros Worldwide Forums | Help | Site Map

What is the max length/size of var keyword in javascript?

Newbie
 
Join Date: Jun 2009
Posts: 31
#1: Oct 22 '09
I want to know the max length / size of var keyword in javascript

Thanks in advance

RamananKalirajan's Avatar
Needs Regular Fix
 
Join Date: Mar 2008
Location: Chennai - India
Posts: 351
#2: Oct 22 '09

re: What is the max length/size of var keyword in javascript?


It varies with the type of data u use... For integer data its like 14 digits. U cant subtract two 14 digit nos. I am telling this out of my own experience

Thanks and Regards
Ramanan Kalirajan
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,665
#3: Oct 22 '09

re: What is the max length/size of var keyword in javascript?


Quote:

Originally Posted by RamananKalirajan View Post

For integer data its like 14 digits. […] I am telling this out of my own experience

detailed information can be found in the specs:
Quote:
The type Number is a set of values representing numbers. In ECMAScript, the set of values represents the doubleprecision 64-bit format IEEE 754 values including the special “Not-a-Number” (NaN) values, positive infinity, and negative infinity.
and while I’m at it:
Quote:
A string value is a member of the type String and is a finite ordered sequence of zero or more 16-bit unsigned integer values.

NOTE Although each value usually represents a single 16-bit unit of UTF-16 text, the language does not place any restrictions or requirements on the values except that they be 16-bit unsigned integers.
Reply


Similar JavaScript / Ajax / DHTML bytes