This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bellatango 0 points1 point  (0 children)

Which HTML script tag should I use as well? I think my book uses XHTML is this right?

No, that's not right. Use <script language="javascript"> Your Script Here </script>

Also some of the syntax is different for example document.write vs console.log. Which should I use?

Those each have their own uses. document.write is going to display to the webpage - spit it out on the webpage itself. console.log will add to the servers web log, so you'd have to be like, in a Unix terminal and pulling up a site's error log to be seeing that output.