I have this array: var output = [[[a], [a1, a3, a5]], [[b], [b1, b2, b3]]] and i wish to create a table as per below in html with javascript: a | b ——- a1 | b1 a3 | b2 a5 | b3 but at the …
Reactjs custom hook won’t fire using an if/else in useEffect?
I extracted my reducer function in a custom hook. When I try to fire decreaseMinutes from the custom hook nothing happens. The other functions of the hook work great tough – such as toggleActive- (probably because they are in an event handler). Any idea how I can solve this? Reducer + Hook Component: Ma…
TypeError: axiosCookieJarSupport is not a function, works in Node.JS but not .vue pages?
I have a function to authenticate with a website, it works when I run it in a basic node.js script but it does not work when run from a .vue page (using NuxtJS framework). When I run it in a .vue page it receives errors stating TypeError: axiosCookieJarSupport is not a function Examples below. Working code in…
JS Regex match numbers between brackets
I have the following code, but getting no output. When I run it here it seems to work: https://regex101.com/r/FVkJfF/1 To clarify, I aim to capture all the values between the brackets if they contain a number (including the opening and closing bracket of that group) Guess I am doing something wrong somewhere?…
Map array of an array to an object in JavaScript [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I’m trying to convert an array within an array that looks like this To an object that l…
Javascript “Not equal to” feature from a prompt
I am a very very beginner in Javascript and am trying to use only very basics. I am trying to only allow two certain words to be accepted into a variable prompt. If anything else other than the two allowed words are entered, I want to display a message saying only the two words are allowed, and to try again
Google Sheets Script Array Length Returning Null
See code below and log. I am working on a google sheets script that updates a google sheet when a linked google form is submitted. To do this I am using the array “event.namedValues”, which is generated automatically when a form is submitted. However while debugging some issues (and learning how t…
Find Missing Character in a Character Array (javascript)
I am trying to write a function that takes in an array of individual characters (eg.[‘a’,’b’,’d’]) and returns the first character that is missing (eg. ‘c’). I am not sure why my current function doesn’t work as described. ps. I’ve seen similar appro…
Preventing orphaned words but exclude tag
I’m using the answer from this question to prevent orphaned words by inserting between the last two word within paragraphs and headings. As the author states, it doesn’t work when the last word is inside the <a> tag. So renders as Can this be fixed so that it ignores any content i…
Vue 3 component not updating after call from vue-router
I want to build a todo app with ionic-vue. It currently uses vue 3. I have this overview (called Lists.vue) where it is possible to click on multiple lists (where tasks should be loaded per list). However, everytime when I click on a list, the same data appears! It is as if the component is being reused but n…