Latest Posts:

Learn How Many Variables Types In Java Script

Learn How Many Variables Types In javaScript

Java is a powerful and changeable language. A master of Java language works and builds easily. Type of operands is required in this language. JavaScript is a type of dynamic languages. When the program is being processed the type determined automatically. Same variable for different types of information in this language. Built in objects java script is a standard library. C programming syntax supports java script. The distinction between expressions and statements makes java script. Various functions-based implementations of Role patterns in java script. In java script not complicated rules, the rules include operator requires. JavaScript is a loosely typed language changing ability in java script. In this language operator check the type of variables.


Six types in java script:


  1. Object
  2. Number
  3. String   
  4. Boolean
  5. Null
  6. Undefined




Objects:

    Objects have arrays, functions, ordinary objects. Object converted value into a primitive, when The result is not a number of the conversation rule. Objects, created by different constructors share the same type. The Object is a value in memory which is created by an identifier. The object is a collection of properties. The data property and the assessable property are the types of object. Mapping between keys and values is a java script object.


Number:

    Numbers are a integers or floating point or the special values NaN and Infinity. The number is a string. If the value is zero, false, otherwise true. A number represents its value. Only one number type in this language. A numbers is not a specific type of integers. The number has two representations: 0 is represented as -0 and +0.


Strings:

    Strings have the empty string. String convert numbers into the java script rules. If the value is the empty string false, otherwise true. Each element in the String occupies a position in the String. The length of a String is the equal of the  number of elements. After did not modify it. It is possible to represent any data structure in a string.


Boolean:

    Boolean have only two conditions: true and false. In Boolean 1 value is true and other 0.


Null:

    Anything has NULL value called null. The Null type has exactly one value: null. See null and Null for more details.



Undefined:

    Some places undefined value, this is undefined. The default value of undefined the variable needs to be initialized. A variable that has not been assigned a value has the value undefined.


Functions:

    In java script using Function you can also create new objects, so there’s also a difference in primitive types and function types. Functions are obviously very important in JavaScript and deserve a separate article, but they don’t have separate type. Functions are special objects.
Share on Google Plus
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment