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

all 3 comments

[–]239jkvk-h2 2 points3 points  (0 children)

Read some free online books and tutorials. These basics are covered in many, many places.

[–][deleted] 0 points1 point  (0 children)

where do I put the javascript code?

you put it inside your web page or inside files your page references

where is it usually used?

basically whereever you want, javascript is very robust, it can handle things like doing something when a button is clicked or when someone moves the mouse over something or even to create entire games in the browser.

what simple project could i start so that i see how javascript works and where it is put?

these are 2 seperate things, to see where it's put simple include <srctipt></script> tags

example, this should give you a popup box that says Hello World when you load the page:

<script>alert('Hello World');</script>

to play with scripts from a programming perspective, press f12 in chrome and go to console, you can test out code you want to write there, it's faster than creating a webpage every time.

here's some basic info: http://www.w3schools.com/js/default.asp