← Back to Printing
Question 2
Variable Addition
Variable Addition
Create two variables (num1 = 5 and num2 = 10), calculate their sum, and useconsole.log()to display the output shown in Expected Output. Steps: 1. Create two variables: num1 = 5 and num2 = 10 2. Calculate their sum 3. Useconsole.log()to print "The sum is: " followed by the result
Expected Output:
The sum is: 15= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Printing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (clog, fn, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.