0
Help with Web Dev Code Repo Project: Event Handling
I am getting the following error when I try to run the code: uncaught SyntaxError: Unexpected identifier Line 16Please help https://code.sololearn.com/WLgLFPJ69wQC/?ref=app
5 Respuestas
0
You forgot the parentheses around the condition in your if statement. Same in line 21.
0
I fixed that error but now I have a new issue: Uncaught SyntaxError: unexpected identifier Line 34
0
JS in Link above has been updated
0
There is an underscore ("_") at the end of the line.
0
There are some issues with the logic in your code.
My first question is: what are you trying to do (maybe because I am not pro, I do not have access to this project and so have no info on it)?
On line 10, You used let price = calc(adult, children)
The variable adult is not defined in your script, unless you meant to use adults
Also on line 10 calc is not a built in function in JS, hence it is not defined so you must define it.
I think calc is only built-in for CSS.
A few other syntax errors are in the if statements (line 16 and 21) you used assignment (=) when it should be equals to (==) or strict equals to (===)
a and a.value is not defined nor is c and c.value