JavaScript Program on Arithmetic Operators

Free Web development courses with real-time projects Start Now!!

Program 1

// let a=4
// let b=10
// console.log(a**2)  // 5*5
// console.log((a*2)**2)  
// console.log("Addition: " + (a+b))
// console.log("sub: " + (a-b))
// console.log("Multiplication: " + (a*b))
// console.log("Division: " + (a/b))
// console.log("Mod: " + (a%b))  

    // let a=(10*2/2+5)-4 
    // console.log(a)

  /* 
          () { }  []
            /   *  %
            +  - 
  */ 

        //  console.log(50+10)    // 60  Addition
        //  console.log("50"+"10")  // 5010  // Concat
        //  console.log("10"+50) 
        //  console.log(40+20+"10")  ///  60 + "10" --->6010
        //  console.log("10"+40+20)  // 104020
              console.log("40"-10 + "40")  //3040
              console.log("Hello" - "Indore") // NaN

 

Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *