JavaScript is a scripting language used for HTML web pages. It is loosely based on Java and built into major browsers. JavaScript code is placed within <script> tags in the HTML and can be included anywhere but is typically in the <body>. A basic "Hello World" example writes that text to the document. JavaScript is case sensitive, uses semicolons but they are optional when statements are on separate lines. Variables are declared with var, if/else statements control execution. Examples determine if a year is a leap year or check a password.