how to divide in javascript code example
Example 1: divide intagers javascript
var quotient = Math.floor(y/x);
var remainder = y % x;
Example 2: javascript 1 + "1"
console.log(10+"1"); //101
console.log(10-"1"); //9
Example 3: js calculate
answer_Add = 5 + 1; //answer = 6
answer_Sub = 5 - 1; //answer = 4
answer_Multi = 5 * 5; //answer = 25
answer_Divi = 10 / 2; //answer = 5
Total = answer_Add + answer_Sub + answer_Multi + answer_Divi;
Example 4: modulus js
console.log(10%3);
//returns 1 (the remainder of 10/3)