JavaScript Program for Data Types
Full Stack Web Development Courses with Real-time projects Start Now!!
Program 1
//console.log(10+20) // addition 30
// console.log("10"+20) // concat
// console.log(50-10) // 40
// console.log("50"-"10"+20) // 60
// console.log("50"*"10") // 500
// console.log("50"/10) // 5
// console.log("Vivek"*"Rahul") // NAN alphabet string
// let a=null
// console.log(typeof(a))
// let b
// console.log(typeof(b))
// + - * /
// a=50
// b=10
// c=a+b
// console.log("Addition is: "+c)
// c=a-b
// console.log("Sub is: "+c)
// c=a*b
// console.log("Multiplication is: "+c)
// c=a/b
// console.log("Division is: "+c)
// Swaping of two values
// a=100
// b=50
// console.log("Before swaping " +a + " " + b)
// c=a
// a=b
// b=c
// console.log("After swaping " +a + " " + b)
// a=100
// b=50
// console.log("Before swaping " +a + " " + b)
// a=a+b // a=150
// b=a-b // b=100
// a=a-b // a=50
// console.log("After swaping " +a + " " + b)
// area of cricle
let r=12.34
const PI=3.14
let A
A=PI*r*r
console.log("area is "+A)
let c
c=2*PI*r
console.log("circumference is: "+c)
Did we exceed your expectations?
If Yes, share your valuable feedback on Google

