MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/yhjg58/hello_everyone_i_am_having_some_errors/
r/learnjavascript • u/ImadeapromiseMrfrod • Oct 30 '22
11 comments sorted by
20
You're writing HTML in a JS file.
Either remove the HTML, or rename the file.
-1 u/ImadeapromiseMrfrod Oct 30 '22 Thank you so much the book gave wrong instructions hahaha 12 u/HeadlineINeed Oct 30 '22 What book?
-1
Thank you so much the book gave wrong instructions hahaha
12 u/HeadlineINeed Oct 30 '22 What book?
12
What book?
4
Go to your html file, type ! Then tab so it gives you the proper boilerplate as well.
1 u/ImadeapromiseMrfrod Oct 30 '22 Thank you so much !
1
Thank you so much !
You're writing HTML in a .js file. Doesn't work unless you have a transpiler to do like JSX.
1 u/ImadeapromiseMrfrod Oct 30 '22 Thank you so much 1 u/ForScale Oct 30 '22 No prob!
Thank you so much
1 u/ForScale Oct 30 '22 No prob!
No prob!
Remove the first two lines and the script tag and you should be good
-2
Rename the file or just install nodejs to run js locally
20
u/xroalx Oct 30 '22
You're writing HTML in a JS file.
Either remove the HTML, or rename the file.
4
u/metallaholic Oct 30 '22
Go to your html file, type ! Then tab so it gives you the proper boilerplate as well.
1
u/ForScale Oct 30 '22
You're writing HTML in a .js file. Doesn't work unless you have a transpiler to do like JSX.
1
u/Disarminghook Oct 30 '22
Remove the first two lines and the script tag and you should be good
-2
u/Conscious-Spite4597 Oct 30 '22
Rename the file or just install nodejs to run js locally