0
Why is the result not displaying
2 ответов
+ 8
There are few bugs you must fix in order to make it work. First, put your entire JS code inside a function which will be called after the HTML window get loaded so that your JS can find all the elements. And when you do so, you must add the event listener on the button in the JS part. Second, you need to use inp.value to retrieve the text value in the input field.
Here's the working code:
https://code.sololearn.com/Wyr8dH32v0Gj/?ref=app