Answers for "how to add to a list javacript"

3

javas script add list

// initialize array
var arr = [
  "Hi",
  "Hello",
  "Bonjour"
];

// append new value to the array
arr.push("Osamah");

console.log(arr);
Posted by: Guest on March-02-2021
0

to htmlhow can i add the list in javascript

$(document).ready(function() {
    $("<li>")
    .html('Scooter')
    .appendTo('ul');
});
Posted by: Guest on December-15-2021

Code answers related to "how to add to a list javacript"

Browse Popular Code Answers by Language