Skip to content

Tag: javascript

Javascript Filter integers

I’m learning javascript on FreecodeCamp. And, the solution of my problem doesn’t help me more. We have to filter integers in an array which is saved in const variable. and I cannot understand really this part num % parseInt(num) === 0 ).map( (num) => Math.pow(num, 2) ); Why using parseint() met…

JS file gets a net::ERR_ABORTED 404 (Not Found)

I am trying to create a simple Io-web-chat. I recently wanted to seperate my <script> inside my html file to an external js file. this is my very simple folder structure: Relevant part of html file: Relevant part of index.js file: Relevant part of server.js file: I also tried putting my files in this pu…

React suspense/lazy delay?

I am trying to use the new React Lazy and Suspense to create a fallback loading component. This works great, but the fallback is showing only a few ms. Is there a way to add an additional delay or minimum time, so I can show animations from this component before the next component is rendered? Lazy import now…