Java Script Data Type - tccicomputercoaching.com Data Type is used to categorized data into various categories: because machine can not differentiate data like 5, 78.90, x, "Hello", *, % etc. All these data are not same. JavaScript variables can hold many data types: numbers, strings, objects and more: var length = 16; // Number var lastName = "Johnson"; // String var x = {firstName:"John", lastName:"Doe"}; // Object When adding a number and a string, JavaScript will treat the number as a string.
Example var x = 16 + "car"; x=16car TCCI teaches web design course in Bopal and Satellite in Ahmedabad. We teach HTML, CSS, Java Script, Boot strap etc. Online coaching is also available at TCCI. For more information about TCCI. Call us @ 9825618292 Visit us @ www.tccicomputercoaching.com