If you want to do it via innerHTML, you have to modify your insertion line to:
document.getElementById("demo").innerHTML += "<option>" + options[i] + "</option>";
You were missing the
getElementById is a function of the document object. And between
innerHTML and the new content you have to add
+=, because you want to append the new text to the innerHTML property. And it has to be
options[i], since you want to display the value you put into the array, not the index i.
You can see it in action here: http://codepen.io/anon/pen/HCAIt