Codelab: Your First JS File

Create a real JavaScript file on your computer and run it in the browser to build a working tip calculator page.

Step 1 of 7

In this codelab, you'll create a real JavaScript file on your computer and run it in the browser!

So far, you've been writing JavaScript inside the WebSprout playground. That's great for learning, but real websites use separate .js files that the browser downloads and executes. In this codelab, you'll create an HTML page and a JavaScript file from scratch, open them in your browser, and see your tip calculator come to life — just like a real web developer would.

Learn more on MDN