Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAnish Hallan
2,334 PointsCan you include the index.html that he is using?
Had to write out the code.
1 Answer
Eric Welch
20,754 Pointspaste this into a text editor:
<!DOCTYPE html>
<html lang="en">
<head>
<title> JavaScript Foundations: functions</title>
<style>
body {
background: #eee;
font-family: sans-serif;
}
</style>
</head>
<body>
<h1>JavaScript Foundations</h1>
<script src="./functions.js"></script>
<button id="action">Action</button>
<input id="text_field">
</body>
</html>
Save it as index.html and save your .js file in the same directory. I generally pause the video and alter my index.html file to match at he beginning of a section and create a new .js file that I annotate with comments so I can understand it when I go back.