Web playground querySelector and getElement is not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Web playground querySelector and getElement is not working

my code look like: INPUT ------------------------------ tag input, id = "my-in". const in = document getElementById "my-in" console log in OUTPUT ------------------------------ {} why?

2nd Oct 2022, 4:21 PM
João Victor
João Victor - avatar
1 Answer
+ 3
const inp = document.getElementById("my-in"); btn = () => { console.log(inp.value); }
2nd Oct 2022, 5:06 PM
SoloProg
SoloProg - avatar