Category "javascript"

Increase div id number with new div fields

The following script creates new input fields up to 4. I need to know how can I increase the ID also as follows.. with first click, "var fieldHTML" generate : &

Minimax Algorithm - Tic Tac Toe AI not selecting best move

I've been working on writing a minimax algorithm for my tictactoe game, but it doesn't seem to be choosing the correct move. It is possible to win against the c

How to convert the image into qrcode in laravel?

convert the image into qr code

React native wont run after ejecting from expo

I developed an app using the managed expo workflow, however it's required to use a native apis (in this case WebRTC) and therefore I ran expo eject to switch to

Is there a thirdparty or solution for get PWA or WEB Push notifications in IOS

I designed a website and I want to send it to its notified users but apparently iOS does not allow this Do you know any software (like a free messenger) that ca

All Combinations of Riddle

I am searching for a function in Javascript that takes in a String like this: var str = '2?5?8?1?4?7?9?2?3' and generates all possible combinations of the ridd

"Expected an arrow function after this type parameter declaration" error

I got this error while running yarn start: $ yarn start yarn run v1.22.17 $ run-s build exec $ babel src/ -d lib/ SyntaxError: .../src/App.js: Expected an arrow

Nested List into JSON File

Am still a complete beginner at programming and have now been given the task of converting with JavaScript an object in Nested List format, which I get given as

Apollo useQuery running twice instead of once when firing multiple queries

in my <Homepage/> component I fetch an authed user and posts using Apollo and useQuery. I can see in my network tab that each one of these queries is runn

How to call more than one function in javascript onclick event? [duplicate]

<Button onClick={(e)=>setId(_id); handleDelete()}>Delete I tried this way, but it gives error.

Create JavaScript event triggers for Google Analytics 4

Articulate Storyline is a software for creating interactive learning courses. I can execute JavaScript triggers in storyline files to track button clicks with G

Not displaying pi chart component on opportunity

`My requirement is to create dynamic pi chart component to count stages on opportunity. Here is my code which displaying only parent component not pi chart whic

Use Single Button to select Multi option and Update or Insert On Ms Sql Server

Multi select option list image I Use a multi select option list and create a save button. write a query like that is INSERT and UPDATE same action occur on sing

React-map-gl with mapbox on NodeJS map -- map is not showing up

I was following a youtube tutorial and followed the steps exactly, however, my map does not seem to work. I get a blank screen even when I put my own access tok

React Native map with Google API, Search bar is not compactable with screen width

This is the code for React Native Map using Google Map's API. import React, { useEffect, useState } from 'react'; import { PermissionsAndroid, StyleSheet, View,

How do I parse a Playfab GetLeaderBoard request result?

I'm trying to work with the PlayFab JS API to set up a leaderboard in my game, and once I retrieve the leaderboard I can not figure out how to parse the returne

Javascript click event not reverting according to my statement

I'm trying to revert my click event after clicking but my else statement seems not to be working, I do not know if something is wrong with my code: var img = do

Not able to send files data from front-end (react.js) to back-end (node)

I have an application that stores to its state files' content, whether images, audio or both, as shown here with the mediaAudio object key: In my react.js code

Filter an object by value from array [duplicate]

I have an array of object b and an array a. I would like to filter b to only have objects where the to values are in a. I've tried many ways b

Randomly Populate table rows in Pug files

Until this morning, I did not know what Pug is. However, now, it's being used in a theme that I am using for work. Ran into this situation. The current pug file