Single Choice Easy

QWhich of the following Node types has a null node value?

ID: #5200 Javascript DOM & Event Handling MCQ 142 views
Question Info
#5200Q ID
EasyDifficulty
Javascript DOM & Event Handling MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Document
  • B DocumentFragment
  • C DocumentType
  • D All of the mentioned
Correct Answer

Explanation

All three node types, Document, DocumentFragment, and DocumentType, have a node value of null.
The nodeType property will return 1 if the node is an element node.
The nodeType property will return 2 if the node is an attribute node.

Share This Question

Challenge a friend or share with your study group.