Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //today's cover topic
- //data type
- //work of console log
- //truth and false value
- //work of variable and what is variable
- //use of console.log
- // console.log('dsfsdfasdfksad;fjsd') //print the data
- //data type
- //what is variable
- //var let const
- // var name = 'shopnil'
- //in c++
- // string name = "shopnil"
- // int x = 5
- //float x = 5.5
- //bool x =true
- // console.log(name)
- // console.log(name)
- // console.log(name)
- // console.log(name)
- // console.log("rohinga")
- // console.log("rohinga")
- //c++
- //int , double, float, bool, string
- //15 , 15/15.5, 15.5 , true/false, "a-z"
- //array, function
- //js
- //data type // 2 type
- //1. primitive
- //2.Object
- //Primitive //3 type
- //1.number 1 , -1, 15.35
- //2. boolean
- //3.string
- //Number
- // [0-9], (-ve) , 25.5
- //boolean
- //true false
- //string
- //[a-z][A-Z] "" or 'true false'
- //primitive data type end
- //Object // 3 types
- //1.array
- //2.function
- //3.object
- //other
- //NaN, undefined, null
- //NaN
- // var data = Number("lakjflsda")
- // console.log(data);
- //undefined
- // var x
- // var y = 5
- // console.log(x) //error
- // console.log(y)
- //truthy value and falsy value
- //1.falsy data (NaN, undefined, null , 0, "", false)
- //Boolean()
- var res
- var a = Boolean(res)
- console.log(res); //undefined
- console.log(a); //false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement