Hoisting, let and gimmicks
31 / 07 / 2016
Let’s jump straight into the code.
Some time ago I was presented with the following task: create in JSON a list of all the 2nd level nodes from an XML input and display the number of children for each such node. It sounds simple but it’s trickier than instantiating the DOMParser
and then using JSON.parse
(read about them at MDN).