Where do I write JavaScript code?

JavaScript provides 3 places to put the JavaScript code: within body tag, within head tag and external JavaScript file . Let’s create the first JavaScript example. The script tag specifies that we are using JavaScript. The text/javascript is the content type that provides information to the browser about the data.

Read more