The point is that the 'name' and 'photo' cases do not provoke the creation of a new <li> element as in the rest of the cases. The solution provided is one option, the other one would be to move the <li> creation and append code to each one of the switch cases which require it. I guess you prefer this second option, right?