Issues with Chrome?
I've tried using a simple server (https://www.youtube.com/watch?v=vnPemSnnJYY) to follow along on my localhost but the code from this video doesn't work in Chrome for me. It works in firefox though. In Chrome only the first alert shows and neither the document.write function nor the second alert run, but they work in FireFox.
Can someone help me understand whats going on?
Brendan WhitingFront End Web Development Techdegree Graduate 84,667 Points
You would need to wrap it like this:
In real life we hardly ever use document.write, so don’t worry about it too much.