-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3-Day.js
More file actions
15 lines (13 loc) · 716 Bytes
/
3-Day.js
File metadata and controls
15 lines (13 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Declare and initialize two variables with number values
const num1 = Number(21);
const num2 = Number(34);
// Declare and initialize four more variables with arithmetic operations performed on num1 and num2
const sum = num1 + num2; // Add num1 and num2
const diff = num1 - num2; // Subtract num2 from num1
const product = num1 * num2; // Multiply num1 and num2
const quotient = num1 / num2; // Divide num1 by num2
// Output the values of the four variables to the console, with descriptive labels
console.log(`Sum: ${sum}`); // Sum: 55
console.log(`Difference: ${diff}`); // Difference: -13
console.log(`Product: ${product}`); // Product: 714
console.log(`Quotient: ${quotient}`); // Quotient: 0.6176470588235294