+ 1
HELP! Why isn’t my javascript code working?
Objective: 1. I want to set the variable “name” = the user’s input after asking for the name of the koala. I’m not sure if I did it right. 2. After the function Name() runs, then I want to change the <h1> to the name of the koala. Can someone tell me why the header isn’t changing to the name of the koala? https://code.sololearn.com/We4BFeQJk50E/?ref=app
5 ответов
+ 5
Yes, is equal a document.getElementById("printName").innerHTML=name;
+ 1
Here is an example based on your code
https://code.sololearn.com/WLb7mGMV4WLO/?ref=app
+ 1
The condition firstFunction === true is executed before your function Name()
0
Jesus Eduardo Canul Koyoc thank you so much! Is ‘n’ a variable?