What is Subtraction Operator (-) in JavaScript?

JavascriptWeb DevelopmentFront End Technology

Subtraction Operator subtracts the second operand from the first.

Example

You can try to run the following code to work with Subtraction Operator −

Live Demo

<html>
   <body>
      <script>
         var a = 40;
         var b = 25;

         document.write("a - b = ");
         result = a - b;
         document.write(result);
      </script>
   </body>
</html>
raja
Published on 19-Jan-2018 06:29:27
Advertisements