why is'int this working? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
29th May 2020, 6:15 PM
@ntm@n
@ntm@n - avatar
4 Answers
+ 3
= assignment == comparison
29th May 2020, 6:35 PM
Kevin ★
+ 2
Kevin Star This is the correct answer. When you're validating the answers with x = NUM your actually assigning NUM to x. I'd imagine it's evaluating to true because it successfully assigned the number. You need the comparison operator (== or ===)
29th May 2020, 7:14 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 1
thank you!
13th Jun 2020, 2:41 AM
@ntm@n
@ntm@n - avatar
0
What exactly is the issue?
29th May 2020, 6:31 PM
$hardul B
$hardul B - avatar