I have been trying to display the following “on this 4th day of January in the year 2022” using javascript on an HTML page but for some reason it is displaying today as the 2nd and not the 4th and where I want to display ie. 4th March 2022 (today +89 days) it is failing to do so… So the
Angular v13 Jest with nx test – SyntaxError: Cannot use import statement outside a module at Runtime.createScriptFromCode
I tried to follow every comment with a possible solution here to the letter. I relied on an example project on github as well which works perfectly. This also started to happen to me after updating everything manually and when running the nx test command, occurrs this error. My jest.config.js inside apps/my-a…
While developing a voice agent, I am using axios to get data from a spreadsheet. However, I cannot get all data at once
I am new to voice agents and particularly to Javascript. However, I am in need to develop a voice agent in the Google Actions Console. The most critical part of my agent is that I need to read data from a google spreadsheet which I figure out I can use SheetDB, a web service, to stream the data from the
Change which image is displayed on hover and click
I’m not a developer. I’ve been however tasked with coming up with a solution for a small project at work with jQuery and I have no clue where to begin. Here’s my codepen: https://codepen.io/axo1/pen/mdBLRjL What I need to is this (all graphics and texts are placeholders): What I managed to a…
Keep toggle switch enabled or disabled when page is switched or refreshed
I got a toggle that switches between dark mode and light mode: Then I got a script that switches to dark mode when the toggle switch is clicked: But when I refresh or switch page, the toggle switch is reset. How can we use localStorage to save the toggle switch status and load the current status when switchin…
Can’t launch selenium drivers while in Electron renderer process
Months ago I built an electron app that scrapes data from a web page using selenium and then visualizes it inside the electron webpage and everything worked fine. After a few months of not using it, I’m having trouble because of many breaking changes inside electron and selenium themselves. The major br…
javascript: how to get all ids of a json array with for loop
I’m having a problem getting the different ids from my json object. I get are the id of the last item. This is the function: This is the json array I get: Thanks to all in advance Answer The concrete error in your code was this line: It needs a “+” before the “=” to add more stri…
span textContent split returns undefined in javascript funtion
I am trying to help a friend out with the following javascript. We both are new to javascript. We are trying to convert the date string to a different format. Based on internet search we understand that the date function expects the input string to be Date(year, month, day) format. To achieve that we need to …
How to pass array parameter to includes method 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 last year. Improve this question I have two arrays: I need something like this, but I can`t pass array into includes method Ans…
Angular – Adjust two way binded input element’s height according to the length of its content
I want to make the height of my input text adjusted to its text content. I can easily achieve that when the user is filling the content by triggering the (input) event, which calls my adjustHeight function which updates the height of the input element using the scrollHeight. Code example below: This works fin…