JavaScript error: Uncaught SyntaxError: Unexpected end of input


#1

i give up on this, the link wont work


#2

<div> elements shouldn’t be inside <script> tags


#3

my code disappeared
idk what happend


#4

ok ive updated it should work now


#5

wut, something went wrong again


#6

you can post your whole code here :slight_smile:


#7

ok fixed it now, should work


#8

nah this website crashes whenever i paste


#9

can you please post a screenshot?


#10

screenshot of what? \


#11

screenshot of your code of course.

If you can’t post it then give me a screenshot


#12

i posted it at http://js.do/code/sendhelp , althought the code was broken and i fixed it


#13

ugh the thing broke. i give up


#14

There are many mistakes in your code.

you are using jQuery in your code so you have to add the source code in your document first.

you didn’t close writeMap function at the end.

you didn’t close your last <div> tag

$(document).ready() shouldn’t be inside writeMap function

To select an id you need to use #.for example

$("#console").text("hi");

Did you learn jQuery?

also it’s not clear what you expect from this code.


#15

like i said earlier, if you had listened.
the website malformed my code for some reason, the actual code has some 100+ more lines


#16

yes i listened that’s why i told you to post the code here.

There are many website where you can test your code.you can use
https://repl.it/
or
http://jsbin.com/

you can post the code here too.read this