I am trying to find and change a item that is inside of an array of arrays. My array is like that: The way i’m doing it now is using a forEach: The problem is that I can’t stop the loop and I believe there must be a better way, maybe using the ‘find’ command. I can do this with
Category: Questions
Discord bot not responding/reacting to anything (JS)
So I am new to the world of discord bots and wanted to try myself on this new challenge. I got the foundation running after watching a few tutorials and reading a few posts but now my problem is that the bot doesn’t react to anything after starting up… All it does is displaying: ‘Ready!̵…
Creating a slider with a menu bar – The heading as a link isn’t aligning up correctly
I hope you’re all well. I am using a code that I took from Codepen, many may come across this before, I am trying to use this code as a navigation menu with the text as a link to the section/page. The text isn’t aligning correctly. Please bear in mind, that I am still new to HTML and CSS and
Bootstrap datepicker get current format
Is it possible to get the current format applied to bootstrap datepicker from the bootstrap-datepicker object? I have several datepickers with different formats and I’d like to get the format in each of them to apply different validation methods based on the current format. Answer I have 3 solutions for…
Vercel CLI issue with localhost
I have installed Vercel CLI to test a serverless function locally. The repository is this: https://github.com/LuigiImVector/github-badge/tree/eda8e1954fc81d69142c461b89f32e9f7635f6f2 With vercel dev I started the localhost server but there is a problem. The homepage (index.html) is loaded correctly but when I…
JavaScript: How to reduce IFs with REGEX
I’m working on the following function which I had to add a few IFs in case the string was shorter than the format the REGEX groups was expecting: Is there a way to remove the IFs and get the same output with just Regex? I’m looking for something like: complete: 999.999.999-99 partial: 999.999.9 Be…
Accessing nested arrays with dynamic depth via indices
I’m fairly new to typescript and I have some issues to access an object in array with dynamic depth. For example: To get Folder4 I’d use the dot notation like: this.folder[0].children[0].children[1] Now I was wondering, if there is a way to dynamicly access the object via the position array withou…
Error: Absolute route path “/” nested under path “/app” is not valid
I suddenly get this error and not sure why.I did not change the “react-router-dom”: “^6.0.0-beta.4” version. But the “react-dom”: “^16.8.4″” had changed to “react-dom”: “^16.13.1”, Dunno if that had anything to do with I don’t…
How to run a function whenever unknown anchor tags are clicked in Vue.js 3?
I have a div with v-html that displays data from a database: <div id=”Content” v-html=”${Content}”></div> Within the ${Content} that is presented, there can be any number of a tags with links to other external pages. I need to parse these and then add an @click handler to e…
Three different `this` behaviours for three different JS engines
I was learning about the this keyword and how it means different things with regards to regular functions vs ES6 arrow functions and function expressions and I came across something odd when trying to run the following code in Chrome, Deno and Node. So I prepared following: Example: Deno output: Node output: …