I’m having an issue where I want to use an existing array and update one of it’s properties using a for loop. I expect the outer id and the id inside the array to match, so for example: a & a, b & b, c & c. However when I print out my final array, all of the inner ids
Tag: javascript
Uncaught (in promise) TypeError: Cannot read properties of null (reading ‘iso3166_1Alpha2’) / Trying to skip null but cannot
I have a global list of mountains. I want to filter all French mountains. To do this, I need to check if iso3166_1Alpha2 is set to FR. The problem is that not all mountains have a value. The script dies after it hits a null value I think because this is the error: This is my script. Seems my check
Convert spread operator from javascript t typescript functions
I cannot convert that piece of code from Javascript to Typescript. The problem is converting the …spread operator. Attempt to conversion to TS: TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. If I change to the function give me a wrong result, because rest is pa…
Unsmooth sliding-up animation
I have created this page and when the “got it” button on the top panel is clicked, the panel will slide up and disappear while the page will also move up to cover the panel space. I have noticed that when the animation plays, it is not that smooth as white space can be seen in the split second tha…
React TypeScript select field does not display
I got useState with a list of strings (currencies symbols like “USD”, “EUR” etc.) And I need to display it into the select field, right now I’m using this: It says the bug is in {symbols.map((symbol) =>…, but I have no idea what to do with it. Full Error: Answer add retu…
Css element does not become active
I’m new to Css and javascript and currently working on a simple project (kinda like a weekly task manager). I created text/html page which contains navbar, 7 dynamic <ul> with “Add task” and “Delete Task buttons”, and each <li> inside of those lists can change it̵…
Get total quantity for each unique product from a table with javascript
I have a resulting table from a backend that returns products and quantities. What i need to achieve is to check for repeating products and sum their quantities in a Overview below the table. I’ve written javascript, that partially works, but with more data i saw that it is not returning correct values …
Google Script – Opting out of a loop before it’s finished, returns later to finish the loop
I have a bit of a weird problem. I built a script that will essentially take variable information from Spreadsheet 1, it will then create a copy of EmptySheet, fill out all the information row by row (let’s refer to it as FilledInSheet after). After that it takes FilledInSheet and deletes the requested …
Array manipulation error with regex – Kata 6 Codewar
In theory it should transform a given array to camel case. I don’t understand what is wrong Answer The .replace() method doesn’t modify the word variable, it instead returns a new modified string. So your code is producing new values within the loop but doesn’t do anything with those values.…
Import JSON inside NPM Module
I made an npm module, this module export a function that load a json file and then export the result ( a little bit simplified ) The probleme is when I import this module inside another project I have this error : I looks like when I import my module, it try to read the json inside the current directory