Race Day


Appreciate if you help with the below. I don’t know why when i have a && condition, I receive an error message as per below:

if(runnerAge>=18 &&runnerRegisterEarlyOrNot= true) {
ReferenceError: Invalid left-hand side in assignment

if(runnerAge>=18 &&runnerRegisterEarlyOrNot= true) {



runnerRegisterEarlyOrNot= true

a single equal sign means assign, why would you want to assign in a if condition? You want to check if runnerRegisterEarlyOrNot equals true, how can we achieve this?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.