I am using the following codes in the console of the firefox DevTools to extract book names from https://bookauthority.org/books/best-problem-solving-books Code 1 Code 2 Even the following code is not working It only says undefined. What can I do? Answer querySelectorAll works just fine. The problem resides i…
Tag: javascript
The Odin Project – Fundamentals 4 Exercises – sumAll
I am stuck in the sumAll exercise from the Fundamentals 4 portion of the Odin Project. I managed to pass the test in which I need the result to be ‘ERROR’. However, I cannot figure out the correct code to pass the other tests. Where did I go wrong? This is the exercise: My code: Answer I made in this
How do I render a component for each object in an array?
I have a functional component. I have an array of objects. const talents = [{…}, {…}] I also return the following components: What I am trying to do is return the Accordion component for every object in the array. What ive tried so far. In the card component i ran a map() on the array: Nothing hap…
How to v-for checked value
I’m trying to create a checkbox select only one. My JS looks like the following: This is the old result. I’m trying to get results like this. I can do this by not the v-for method, but I want to do it this way. Because I have a lot of data, How can I checked value in v-for? Here is
Typoglycemia generator [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question My goal is to create a “typoglycemia generator” using HTML CSS…
Javascript: how to create an infinite-loop of promises?
I want to write in Javascript the following pseudo-code: I’ll explain it in words: asyncOperation uses a Promise, for example an AJAX call. I want that if the promise is rejected, then asyncOperation will be invoked again. Do you know how it can be done in Javascript? Answer If you’re going to use…
Mobx’s observable loses child objects equality
When I create an observable from plain object which contains fields that are effectively same objects, this property are not equal objects anymore. So if I change one’s property, the second stay untouched. Is there a proper way to handle this? https://codesandbox.io/s/mobx-equality-demo-5eowk Answer Whe…
Matching 2 arrays based on the values of some fields
I have the following list of ingredients in an array called myBar. The ingredient is contained in the attribute “name” I also have a second array called cocktailList containing a list of cocktail recipes. In here the ingredients are contained within the field “ingredients”. I’m t…
Tailwindcss not working with next.js; what is wrong with the configuration?
For some reason, tailwind is not rendering properly in next.js. I’m wondering if something is wrong with my settings? Styles folder – tailwind.css @tailwind base; …. _app.js What am I doing wrong? so confused, usually this sort of setup is fine. This is the site btw – https://moodmap.a…
Unable to exit the function after ‘window.alert’ in Angular9
I am trying to calculate time difference and if time difference is greater than 20 mins, I want to display an alert message and then exit. I don’t intend to loop through all the rows and want to exit the function after finding out the first host which has minutes < 20. I am trying to exit the functio…