Any option to use "return "as check condition of elseif in js

If ( return == false){ Event. prevent default (); }Else{ Return true; Location. reload;} This is my javascript code it not working. It's show expression expected. Ts (1109)😒😒

6th Nov 2022, 8:38 AM
Mu_G Rahiman
Mu_G Rahiman - avatar
2 ответов
+ 2
Can you copy/paste your code? Actually your posted code is bad on many contexts (in particular language grammar). Anyway, probably, your problem is that you using a keyword like an identifier (return is a language keyword)
6th Nov 2022, 9:24 AM
KrOW - avatar
hmmm there are some reserved words in all programming languages called keywords. They can't be used as a user defined ones. likewise 'return' is also a keyword
6th Nov 2022, 10:07 AM
observer - avatar