A Code From A Video Course | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

A Code From A Video Course

Could anyone advise me why this code that I just copied word for word from a course does not work? https://code.sololearn.com/WWz1w43BWge6/?ref=app

16th Oct 2019, 10:16 AM
Nadiia Shtarova
Nadiia Shtarova - avatar
2 Answers
+ 1
https://code.sololearn.com/WWz1w43BWge6/?ref=app#html // See the code
17th Oct 2019, 6:55 PM
Jônatas Araripe
Jônatas Araripe - avatar
+ 1
// First the application Sololearn have any problem, he is load the Script before code HTML Body // Second, you forgot about single quotes at the beginning of these DOM searches. document.getElementById(number1').innerHTML =""; document.getElementById(number2').innerHTML =""; // Third, you wrote the wrong property, the correct one was "Check", exactly as found in DOM var btn = document.querySelector('input[type=button][value=check]');
17th Oct 2019, 7:01 PM
Jônatas Araripe
Jônatas Araripe - avatar