Variable Addition
easyQuestion 2Create two variables (num1 = 5 and num2 = 10), calculate their sum, and use console.log() to display the output shown in Expected Output.
Steps:
1. Create two variables: num1 = 5 and num2 = 10
2. Calculate their sum
3. Use console.log() to print "The sum is: " followed by the result
Expected output
The sum is: 15= newline. The output ends with a newline, so 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.