The following code aims to ask the user to input 2 integers and
then ask the user to input the sum of these 2 integers and check if
the user gets it right.
q = prompt("Enter the first integer");
r = prompt("Enter the second integer");
s = prompt("What is the sum of these 2 integers?");
if ( [Boolean Expression] )
alert("Right!");
else
alert("Wrong!");
What should be used as [Boolean Expression] in the above code?
Check all correct answers.
Group of answer choices
s = q+r
s == q+r
Number(s) = Number(q)+Number(r)
Number(s) == Number(q)+Number(r)
Number(s) == Number(q+r)
Number(q)+Number(r) == Number(s)
q+r == s
The following code aims to ask the user to input 2 integers and then ask the user to input the sum of these 2 integers a
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am