I am trying to assign certain functions and calculations into the code blocks but the error “Error: “{” expected” appeared and I don’t know what is wrong with my code. I believe its a simple issue but I just can’t figure it out.
1.- The name of the function is the same as the name of one of the variables.
2.- Those invalid symbols " | " in a variable
3.- Bad variable declaration.
4.- return require a “=” symbol.
5.- The else statement doesn’t require any condiion.