JavaScript Program on Data Types and Variables Part – 2
Full Stack Web Development Courses with Real-time projects Start Now!!
Program 1
// console.log(10+20) // Addition
// console.log("10"+"20") // Concat
// console.log(10+"20") // concat
// console.log(" "+"vivek" + " ") //concat
// console.log(40-10) // 30
//console.log("40"-10-"20") //30
//console.log("40"+"10") // 4010
// console.log("40"*"10") // 30
// console.log("vivek"-"rajesh"); // NAN
// console.log("vivek"*"rajesh"); // NAN
// console.log("20" - 30) // -10
// console.log("20A" - "30") //NAN
// Write a program for addition sub ,multi,division of two
// + * / -
// 50 30 before swaping and after swaping
// let a=50
// let b=30
// let c
// console.log("Before Swaping: " + a + " " + b)
// // c=a
// // a=b
// // b=c
// a=a+b
// b=a-b
// a=a-b
// console.log("After Swaping: " +a + " " + b)
// var a=null
// var b=100
// console.log(a) // null
// console.log(typeof(a)) // object
// console.log(b)
// console.log(typeof(b)) //undefined
// Area of circle
let r=12.13
let a,c
const PI=3.14
a=PI*r*r
console.log("Area of Circle is: " +a)
c=2*PI*r
console.log("circumfrance of Circle is: " +a)
Did you like this article? If Yes, please give DataFlair 5 Stars on Google

