JavaScript · Module 1
Answers and explanations · Make the browser follow your instructions
Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.
JavaScript · Module 1
Compare these references after your own attempt. You can read them at any time; they do not record a live model or vendor run.
A: multiplication binds more tightly, so the ungrouped result is 14. Parentheses make 2 + 3 happen first, so the grouped result is 20. Neither answer depends on the order in which you typed the two lines.
B: sitename is a different identifier from siteName. Restore the capital N. A ReferenceError here means the name could not be found. Rewriting the string would not fix the missing identifier.
C: a complete welcome.js can be:
const title = "Paper collage studio";
console.log(title);
console.log(18 - 6);
Use <script defer src="welcome.js"></script> in the HTML. A 404 in Network says the requested path could not be served; a ReferenceError says JavaScript ran and could not resolve a name. Check the layer indicated by the evidence.