I can't output an array from a user's input – Javascript
I need to create a program which asks a user to input a list of names and each name should be added to an array and the user can only input 10 names maximum and if they try to input…
I need to create a program which asks a user to input a list of names and each name should be added to an array and the user can only input 10 names maximum and if they try to input…
I have the below array var firstjson = [ { "Week" : "Week 1", "Product" : "Apple", "Buy" : "24", "Sell" : "20", "Profit" : "100", "Lost" : "20" }, { "Week" : "Week 1", "Product" : "Egg", "Buy" :…
This is the output error I am receiving structure for campground variable is below--> let campgrounds = [ { number: 1, view: "ocean", partySize: 8, isReserved: false }, { number: 5, view: "ocean", partySize: 4, isReserved: false }, { number:…
I have an array that contains several members. Then I created a new instance of a MemberValue object in which I passed this array called "name" as a value but it passed all the values as a single string. var…
I have the following object, and I want to iterate and check the value of each object i.e. requestArr.st.value and if there is a value, then return the expr value. var x = 12345 var y const requestArr = {…
I have an array of strings, which are either an asterisk by itself ("*") or something else. I want to "merge" consecutive asterisks as follows: If there are one or more asterisks in a row, remove them from the array,…
Assume there is the following array const array = [ "2023-03-14T13:00:00.000Z", "2023-03-13T12:30:00.000Z", "2023-03-06T13:00:00.000Z", "2023-04-24T11:30:00.000Z", "2023-03-24T13:00:00.000Z", ] and a date value Thu Mar 24 2023 00:00:00 GMT+0100 As you can see, the date value is a start of the day value…
I have an array that contains several elements after that I created an object in which I passed this array as a value but it passed all the values as a single string. var cars = ["Saab", "Volvo", "BMW"]; console.log(cars);…
I have a problem condensing a large list of dates. The source code can be seen here https://onlinephp.io/c/d8277 Source code: <?php function list_date($array = []) { $events = $array; for ($i = 0; $i < count($events); $i++) { $this_event =…
I am trying to store a large number of news articles (eventually maybe more than several thousand) that I am using in a Python script. For convenience, I would like to store them in a 2D array within a text…