Category "javascript"

inverting object boolean property with ! vs =false , Is there any difference?

I am trying to make tic tac toe game in vanilla javascript. If I use ! to flip the value of object boolean property , it is changed to what it is defined in glo

Why do some images cause requestAnimationFrame() to lag/drop framerate?

Basically the title. I was creating a smoothly scrollable gallery with a bunch of images but I noticed a ton of lag. I was getting massive framerate drops/lag w

Browser address bar displays #[object%20Object] when clicking the menubar

I found that if I click one of the sections in menubar, the browser address bar displays #[object%20Object]. But it didn't influence scroll-to-section. Partial

Cloudflare KV namespace doesn't bind

Ran wrangler dev and it doesn't seem to bind Worker KV: ERROR in /src/handler.ts ./src/handler.ts 16:8-17 [tsl] ERROR in /src/handler.ts(16,9) TS2304: Can

How do I save data, that would normally be in a database, to a SharePoint folder or the site's root folder

I'm working on a project for my employer that is off-job-description for me. I am not in my department's IT/WebDev departments. That being said, my department i

Container is not defined problem in React

I'm trying to learn React but this 'Container' is not defined and I don't know why I got this error, even though I did everything in the course Here is App.js i

Discord JS - interactionCreate and messageCreate

I've been trying to use interactionCreate event, but somehow it's not working. I'm not sure why, and I didn't find exact documentation about this event, only th

Is there a way to having loading animation show until the page is fully loaded?

I have deployed my website on netlify but, the website displays only HTML until it finishes loading... Any tips on a way to make the website only show once it h

A function to obtain all leaf node properties of an object in an array of string in javascript

Request you to please help in building a function in javascript to obtain the mentioned output from the input given. INPUT : An object (possibly a nested object

Convert into DateTime format ISO8601

I am receiving the input date as below. 2022-05-05 18:08:13.311951 +0:00 And I am trying to convert this to below format which follows ISO8601 format. 2022-05-

The value is undefined. (Discord.js newest version and Node.js)

I have spent like 2 hours trying to debug this and I don't know what to do. I get the following error: connection.destroy ^ TypeError: Cannot read properties of

How to make Phaser3 GlowFilterPostFx work in an ES6 project?

I'm trying to apply a dynamic glow effect to some of my Phaser3 game objects. There's no built-in glow effect, but the framework author publishes a separate pac

"SyntaxError: Unexpected token < in JSON at position 0"

In a React app component which handles Facebook-like content feeds, I am running into an error: Feed.js:94 undefined "parsererror" "SyntaxError: Unexpected

Why does my D3 code break when I set the script type to module?

I am working on a project built with Javascrpt, jQuery, and Vite.js. My colleague built a data visualization using D3 - a US states map - that I need to implem

web3 JS payment button for Metamask BSC bep20 token

I would like to accept donations from visitors, I only want an specific token with pre set amount and only people with metamask. if (typeof window.ethereum !==

loop through array issue

I am calling an API that returns an array, i am trying to loop through the array but console is saying that the lenght is 0, never seen anything like it before

ffmpeg exited with code 1: Error reinitializing filters! Failed to inject frame into filter network: Invalid argument

Using video show npm I am creating a video from multiple images. initially there was an issue but then I download and installed ffmpeg. Now another error occurs

Highcharts.JS deleting data and freezing browser

I'm retrieving data from Firebase RealTime Database. I need to get the values in a chart so I decided to use highchart.js. Could someone please explain to me wh

MongooseServerSelectionError: connect ECONNREFUSED ::1:27017 wont get fixed

I've been trying for over 2 hours now trying to figure out what's wrong with this database. I've tried everything. From reinstalling the server, restarting the

Syntax highlighting via Prism in Glorious Demo

So I found out about 'Glorious Demo' today, and I'm testing out a demo of it. After getting Glorious Demo to work initially, I tried adding syntax highlighting