JavaScript JavaScript Basics Introducing JavaScript Review Introducing JavaScript

Yemaya Re
PRO
Yemaya Re
Pro Student 1,922 Points

"Fill in the blank to write a message to web browser".../can they be more specific??

I wrote console.log... and apparently I'm wrong...there are a few ways to write a message to the browser...what do they mean...document.write...alert("<h1>...")... they need to be mmore specific with this question. Thanks

1 Answer

Valeshan Naidoo
Valeshan Naidoo
Full Stack JavaScript Techdegree Student 19,938 Points

document.write is the correct answer. Web browser is the window that the user views. The alert function isn't writing a message on the browser, it's popping up an alert box. The console.log prints a message on the console, but not on the web browser window.

Yemaya Re
Yemaya Re
Pro Student 1,922 Points

Ahh I see. Thank you because I was a little confused!