JavaScript Debugging: Sample One

The first P1 tag

The second P2 tag

The third P3 tag

Add/Remove a node

Answer following questions and locate errors using firebug:

  1. Can we get the "mydiv" division tag?
  2. Can we create a P node(tag)?
  3. Can we create a text node?
  4. Can we successfully add a text node to the P node?
  5. Can we successfully add a P node to the DIV node?

A mistake in the logic condition: