← Back to Printing
Question 85
Report a Rectangle's Area
Report a Rectangle's Area
Combine variables and a multiplication inside one template literal. width is 4 and height is 6. Print A 4 by 6 rectangle has area 24. The area is width times height, and you should compute it directly inside the string using ${width * height} so the number 24 appears without you typing it yourself.Expected Output:
A 4 by 6 rectangle has area 24.= 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.