Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to do subtraction in javascript

//To subtract in Java script, you have to put an subtraction symbol '-' between them. If you have stored two numbers in variables, just put an subtraction symbol between the variable names.
//For example:
var a = 6
var b = 5
var c = a-b
var d = 6-5

Bot.send (c)/ print (c)// or whatever you use to get output
Bot.send (d)/ print (d)// or whatever you use to get output

//output will be: 1, 1
 
PREVIOUS NEXT
Tagged: #subtraction #javascript
ADD COMMENT
Topic
Name
2+8 =