1var fruits = ["Banana", "Orange", "Lemon", "Apple", "Mango"];
2var citrus = fruits.slice(1, 3);
3// ["Orange", "Lemon"]
1var colors = ["red", "black", "green", "yellow", "blue","brown"];
2var subset_of_colors = colors.slice(1, 3); //["black", "green"]
1//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.
2//For example:
3var a = 6
4var b = 5
5var c = a-b
6var d = 6-5
7
8Bot.send (c)/ print (c)// or whatever you use to get output
9Bot.send (d)/ print (d)// or whatever you use to get output
10
11//output will be: 1, 1