How to Create Elements and Use appendChild in JavaScript