Category "javascript"

Trigger the remove() of an event outside of fullcalendar declaration

I'm working on a Filemaker webviewer and it display a calendar that is generated using Fullcalendar library in js. My issue is when I drag & drop an event i

Write JSdoc for generic function in typescript

I've distilled an essence of my problem with following codes: full source I have Base class, and Derived, Derived2: class Base { static get type() {

create-react-app shows an error of "You need to enable JavaScript to run this app."

I use express for my API. I have a folder named app and another folder named server. app is the client app, using create-react-app as boilerplate, while server

Looping an entire p5js script

I was wondering if it is possible to run the following code on the p5js web editor or within VS code multiple times and change the parameters a, b, A, B, H from

How does this function that takes in a RequestHandler in express work?

I was browsing through some code examples for Express server on GitHub and came across this function used to wrap around REST API controllers and was confused h

How to convert timestamp firestore to date string and display in antd table

First, i have antd table and datasource from firestore with some fields and include timestamp field. my data is good running and show it in antd table, the prob

Using Video as Mask of Video with Canvas

I have been trying to create a dynamic mask from one video onto another one. Neither videos have an alpha channel (and even then it would have low support in br

If let is not hoisted or they goes in temporal dead zone, then why this snippet is throwing error, when it could have just used the global reference

var a = 6; { console.log(a) let a =55 } when i execute this snippet I get following as error message: ReferenceError: Cannot access 'a' before initiali

Jest : TypeError: require(...) is not a function

The application is written by React with ES6 so import and export statements are used inside the application. So Jest is configured to work compatible with ES6,

Can't load popper.js with webpack and Laravel mix

I'm using bootstrap 4 beta and Laravel 5.4 on my project and loading my js dependencies with npm and laravel mix. So far everything has been working great, exce

Using external javascript files in node.js without using export and require

I don't like the whole export/require stuff in node, it takes too long. Let's say I have a file server.js and I want to use functions in whatever.js. in html I

how to and array of objects from a subscribe method and store it in another array for use in functions?

I have a service to get data from the backend database and display the array of objects that works fine, the only problem is I can not use it outside of the sub

Javascript: Get nth character of string (JSChallenger)

I am a total newbie and currently learning Javacript. I encountered this problem on JSChallenger and have been struggling with it. Here's my code: // Write a fu

Visual Studio Code 1.67.1 - Fails to provide any choices when using snippets

results: failed choices in VSC snapshot.code-snippets (code) "Wait4widget": { "scope": "javascript", "prefix": "wait4widget", "body": [ "awa

Problem with updating styles in JS for my class

So I have a problem with updating styles in JS for my class. In debug I can see that variables change correctly foreach object as they should, but style changes

How to set a component non-reactive data in Vue 2?

I have a categories array, which is loaded once (in created hook) and then it is static all the time. I render these array values in a component template. <t

How to display highchart series line marker symbol from local image object?

I'm trying to get a few custom symbols in Highcharts. I'm currently following the specs: marker: { symbol: 'url(

How to reverse a string that contains complicated emojis?

Input: Hello world👩‍🦰👩‍👩‍👦‍👦 Desired Output: 👩‍👩‍👦‍👦

Slack incoming webhook: Request header field Content-type is not allowed by Access-Control-Allow-Headers in preflight response

I try to post a slack message via the fetch API in a browser: fetch('', { method: 'post', headers: { 'Accept

JavaScript: How to filter data in an array

I have following object in JS: [ { "financial_year":1, "mainline_revenue":18743.0, "regional_revenue":2914.0, "other_revenue":3198.0, "no