Wednesday, July 23, 2014

Variables Data Type

we know what are variables but we use the "var" to initialize a variable without making it for specific type since we know we have numbers,text,alphabet and Boolean   the "var" is like a general container which can store anything we want but we cant store text in number variable for sure lets see the variables data type :

  1. Integers: are then numbers without negative value its from zero to the last number in the world but its all positive and it'll be an programming Error which might stop the page from doing some stuff because of that error how to declare this kind of variables :
  2. Strings: strings used to store and save text or an array of letters or just one letter as you wish 

     3.  Boolean: it has one two values "true" or "false" its just like the "on" and "off" in the electronic stuff        we usually use this in the conditions we want to happen before the action should start 
         
    these are the most common used data type of variables there's float for number and its between -36,000 and +36,000 and double for numbers too but has more numbers than float 

    NOTE: if you dont want to get stuck with all these types just use the General form of it "var" but you must know all this 

No comments:

Post a Comment