I'm trying to add this array to the DOM, with each string element as part of an unordered list. Below I try to set message[i] = the element of the array I want to append to the list, but it doesn't appear to be working. Fetch new is an callback function that gets an array of strings as it's input FYI. Basically I am trying to display each element in that array at the bottom of the ul. ul class="messages" fyi. Is there something wrong with the way I am assigning the variable value?
function fetchNew() {
var PrintChat = function (Chat_Messages) {
var y = Chat_Messages.length;
for (i = 0; i < y; i++) {
var message[i] = $('<li>Chat_Messages[i]<li>');
$('.messages').append(message[i]);
}
}