• Coding
  • Deleting a DOM element in Javascript

I just thought this was kind of funny...
This is the only way I know of to have DOM element (here "image") delete itself, using JavaScript:
image.parentNode.removeChild(image);
Since there is not delete() method or anything like that on the element itself, as per DOM specs, you have to invoke the removeChild() method of the parent...