Category "javascript"

Edit yaml files using js function

I am trying to edit a template-yaml file using a js function. The js function will get a name of organization: org and this will replace corresponding values in

Karate environment value not getting set in config json

I have config-base.js which is loading the 'env_data.json' file. The java script in config-base.js is not setting the values in config as expected. I am trying

How do I upload multiple files in array in Angulars reactive forms, from an API and send the data as a number to the array

***ERROR IMAGE: *** https://ibb.co/JKd0hV3 Who can help me solve this problem, I get a 490error whenever I run this code. Am I missing something or need to refa

What does the Array method `reduce` do?

I found a very useful function reduce, and I'm using it, but I'm not sure if I understand it properly. Can anyone help me to understand this function? Example:

ace editor - generate file preview

im wondering if its possible for ace editor to generate an overview of the current file, like i see in some other text editors, like in the image from vscode be

Check if a date include a certain hour

I'm working on a fullcalendar project and I was wondering: is there a way in Javascript, with a new Date object, to check if an event include a certain period o

NodeJS app can't work because of dependencies script being blocked due to MIME type error

my teammates and I are currently developing a web game with babylonjs and we need to deploy it on heroku. So I created a file app.js to be the "server" side, he

Why am I getting an error in my Route Redux code?

I can't find my error in the code. Could someone explain to me. Test: Nav:' should be rendered on the path "/". The "Home" component should be rendered only on

Have a paper js file that can be imported as a module

I am making a game and I would like to have my code split into two files. One, an ordinary javascript file for the gameplay, the other a paperscript file for al

React render message to stay at the bottom

Currently working on a 1:1 live chat messenger. when i send a message its shows up at the bottom of chat where i want it to, but upon page refresh it returns to

which/how to properly use a loop for html change with Javascript?

I am new in Javascript and trying to change the HTML content of a line. I've been helped a little by a friend who made this code for me, but I'm running into ma

Top level await in WebdriverIo Mocha tests

I am trying to use top-level await with WebdriverIO but keep getting below error [0-0] import axios from 'axios'; [0-0] ^^^^^^ [0-0] [0-0] SyntaxError: Cannot

How do you test a form upon the submission addEventListener with jest without a framework only vanilla JS

Most of the research I have done in regards to jest testing unit testing and/or integration testing is all heavily geared towards React. But I am not using reac

How to set data in Firebase .onSnapshot()

I'm trying to set data with this function and its not setting the variable. How can I set information for outside use with this? Here is my code const docRef =

VueJS - create readonly copy of a ref object (Composition API)

I am getting data from db by onMounted hook and showing object in a form. When user clicks to save, I just want to check if object data has changed or not. onMo

Why my Interactive Art is not working like it should on mousemove

I made an Interactive Art but instead of scaling each child different pixels it is scaling each child same px. P.S the commented out code const WIDTH = 512

Firebase addDoc not writing data to Firestore

I'm trying to write some data to my Firestore database. I've been following Firebase docs but for some reason nothing is being written to my database. I'm not r

How do i use chartjs in react project properly?

Im trying to use chartjs in my react project but it doesnt work. What am i doing wrong? You can see console logs here: logs import styled from "styled-compo

Remove punctuation at end of line in responsive text block

I have a list of a large number of Things divided by bars, i.e. Thing 1 | Thing 2 | Thing 3. They're in a responsive container and so I have no way of knowing w

Django : Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

Error When Click Button for send data. Please Helping me to solve problem. Error When Click Button for send data. Please Helping me to solve problem. Error When