Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
It is because you are selecting the html element with class quest using the class selector. class selector returns an array of elements. You should use id selector if your only selecting one elememt. document.getElementById("questId"); Do not forget to add the "questId" also to the element in html.
8th Oct 2020, 3:01 PM
Steve Sajeev
Steve Sajeev - avatar