Install VS code and node.js in your PC and connect VS code to node.js then type the code in VS code and run in its terminal.
//Revision Lecture 1: 24 Sep 2022
//Topic 1: //* Data Types in JS *//
//1) string
//2) number
//3) boolean
//4) undefined
//5) NaN
//6) object
//7) array
//1) String: everything written in single or double quotes is a string
let a = 'Tuljabhavani';
let a2 = "Tuljapur";
let a3 ='500';
console.log(typeof(a)) // result--> string
console.log(typeof(a2)) // result--> string
console.log(typeof(a3)) // result--> string
//in JS string + number is considered as a string
let b = "Amol" + 10
console.log(typeof(b)) // result--> string
console.log(b) // result--> Amol10
//if arithmetic operations with numbers are after string then it will not perform that operations
let b2 = "Amol" + 10 + 5
console.log(b2) // result--> Amol105
//if arithmetic operations with numbers are before string then it will perform that operations
let b3 = 10 + 5 + "Amol"
console.log(b3) // result--> 15Amol
//2) Number: any +ve, -ve number, number with decimals
let a4 = 50;
let a5 = 50.7;
let a6 = 200/100
console.log(typeof(a4)) // result--> number
console.log(typeof(a5)) // result--> number
console.log(typeof(a6)) // result--> number
//3) Boolean: boolean has only two values - true or false
let a7 = true;
let a8 = false;
let a9 = 5 > 4
console.log(typeof(a7)) // result--> boolean
console.log(typeof(a8)) // result--> boolean
console.log(typeof(a9)) // // result--> boolean
//4) undefined: any variable whose value is not defined
let a10;
console.log(typeof(a10)) // result--> undefined
//5) NaN: when result of arithmetic operation can't be expressed then output is NaN (Not-a-Number)
let a11 = 12/"solapur"
console.log(a11) // result--> NaN
//6) Object: objects are written with curley braces
let a12 = {FirstName: 'jivan'}
console.log(typeof a12) // result--> object
//7) Array: arrays are written with square brackets
//the type of array is also a object because everything in JS is an object
let a13 = ['amol', 'Jayesh']
console.log(typeof(a13)) // result--> object
----------------------------------------------
Data types in JavaScript with examples, javascript course, javascript course online free, javascript lessons free online, javascript lessons for beginners, javascript tutorial for beginners, javascript tutorial for beginners step by step, javascript tutorial for beginners step by step in hindi, js tutorial for beginners step by step with examples, javascript course fees in pune, javascript course in pune, javascript course in mumbai, javascript course in solapur, javascript course in latur, javascript classes online, javascript classes in pune, javascript classes in mumbai, javascript classes in solapur, javascript classes in latur, javascript classes in osmanabad, javascript classes in nagpur, javascript classes in aurangabad, javascript course in nagpur, javascript course in osmanabad, javascript course in tuljapur, javascript classes in tuljapur
टिप्पण्या
टिप्पणी पोस्ट करा
आपल्या प्रतिक्रियेबद्दल धन्यवाद ! आम्ही लवकरात लवकर प्रतिक्रियेला उत्तर देण्याचा प्रयत्न करू