79524714

Date: 2025-03-21 06:45:29
Score: 1
Natty:
Report link

document.getElementsByClassName("tagtype"), will return an HTMLCollection which does not have an append() method. Use [0] with getElementsByClassName to get the first element, otherwise varName is not treated as an element but a collection.

var varName = document.getElementsByClassName("tagtype")[0];
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: mayankdv