skip to Main Content

Jquery – Javascript array search and filter

I want to create new array based on keyword. if my search key word is "align-center" result should be ["align-center"] "align" result should be ["align-left", "align-center", "align-right"] "right" result should be ["align-right"] "arrow" result should be ["align-left", "align-right"] const myarray…

VIEW QUESTION

Javascript – assign numbers to Ids

const randId = "comment_" + Math.floor(Math.random() * 1000); const commentButton = document.createElement("section"); commentButton.id = randId; commentButton.className = "comment2"; let IDArray = []; let numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]; function addButtonClick() { if (numbers.length >…

VIEW QUESTION
Back To Top
Search