Someone mentioned that this approach was not considered "proper", but I didn't pay much attention to it until I encountered a run-time error in IE9. Now, I need help converting the code to utilize object properties instead. What is the reason behind innerHTML being frowned upon as a best practice?
var element = document.createElement('div');
element.innerHTML = '<a name="a1" class="b" href="' + data[2].value + '">' + data[1].value + '</a>';