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 trial

JavaScript The Solution

No preview and the console is not acusing any errors

I wrote this bit of code and tested it

alert("Let's do some math!");
var first = prompt("Please, type a number");
first = parseFloat(first);
var second = prompt("Please, enter a second number");
second = parseFloat(second);

var header = "<h1>Math with numbers " + first + " and " + second + ".</h1>";
document.write(header);

I already linked the file to the webpage, but it wont display anything, not even the alert. The console is empty, not showing any messages.

Can you post a snapshot? It is the camera icon in the upper right corner.

3 Answers

That will work. In your index.html you have scr

<script scr="js/math.js"></script>

It should be src

<script src="js/math.js"></script>

I don't know how to post the snapshot, but I will put this link here from it. Let me know if it works! Thanks!

https://w.trhou.se/ol9hn66xvr

Thanks, Kris! It's not the first time I made this mistake lol Oh God. Really appreciate it!