Answers for "4.6.1. Operators and Operands¶"

0

4.6.1. Operators and Operands¶

console.log(2 + 3);
console.log(2 - 3);
console.log(2 * 3);
console.log(2 ** 3);
console.log(3 ** 2);

//5
//-1
//6
//8
//9

/*The symbols + and -, and the use of parentheses for grouping, mean 
in JavaScript what they mean in mathematics. The asterisk (*) is the
symbol for multiplication, and ** is the symbol for exponentiation. 
Addition, subtraction, multiplication, and exponentiation all do what 
you expect.*/
Posted by: Guest on June-06-2021
0

4.6.1. Operators and Operands¶

/*When a variable name appears in the place of an operand, it is 
replaced with the value that it refers to before the operation is 
performed. For example, suppose that we wanted to convert 645 minutes 
into hours. Division is denoted by the operator /.  */

let minutes = 645;
let hours = minutes / 60;
console.log(hours);

//10.75
Posted by: Guest on June-06-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language