Tag Archives: javascript

Can (a ==1 && a== 2 && a==3) ever evaluate to true?

Is it ever possible that (a ==1 && a== 2 && a==3) could evaluate to true, in JavaScript? This is interview question asked by a major tech company. My answer was that it’s impossible. They said nothing is impossible. It … Continue reading

Elsewhere , , 1 Comment

JavaScript: Removing a property from an object immutably by destructuring it

Say you have a JavaScript object like this: const user = { firstName: ‘Bramus’, lastName: ‘Van Damme’, twitter: ‘bramus’, city: ‘Vinkt’, email: ‘bramus@bram.us’, }; And now say you want to create a copy of the whole object, except for the … Continue reading

Original Content , Leave a comment

Stealing Usernames, Passwords, and other (Personal) Data via Browsers and NPM Packages

đź‘‹ This post also got published on Medium. If you like it, please give it some love a clap over there. Late 2016, Stoyan Stefanov published “Oversharing with the browser’s autofill”. It’s an article on stealing personal data using the … Continue reading

Original Content , , , , Leave a comment

JavaScript Object and Array Explorers

If you’re starting out with object and array manipulations in JavaScript these handy tools by Sarah Drasner might come in handy. The reason they work so well is that it’s one page, and it’s driven by natural language. JavaScript Object … Continue reading

Elsewhere , , , Leave a comment

Scrollama – Scrollytelling with IntersectionObserver

Scrollama is a modern & lightweight JavaScript library for scrollytelling using IntersectionObserver in favor of scroll events. The code that accompanies the markup pictured above: // instantiate the scrollama const scroller = scrollama(); // setup the instance, pass callback functions … Continue reading

Elsewhere , , Leave a comment

Feeding the Audio Graph – Using Web Audio’s AnalyserNode

Good article on 24ways (yes, that still is a thing) on using Web Audio’s AnalyserNode. const waveform = new Uint8Array(analyser.fftSize); const frequencies = new Uint8Array(analyser.frequencyBinCount); const ctx = canvas.getContext(‘2d’); const loop = () => { requestAnimationFrame(loop); analyser.getByteTimeDomainData(waveform); analyser.getByteFrequencyData(frequencies); ctx.beginPath(); waveform.forEach((f, … Continue reading

Elsewhere , , , Leave a comment

Getting started with Mapbox GL JS

Good intro by Arden de Raaij on setting up a basic Mapbox GL JS map with clickable markers that zoom upon getting clicked. Mapbox GL JS is a JavaScript library that uses WebGL to render interactive maps from vector tiles … Continue reading

Elsewhere , , Leave a comment

Wes Bos – Async + Await

Short talk by Wes Bos on Async + Await, as recorded at dotJS 2017: Slides available here. Related: JavaScript: From Callbacks to Promises to Async/Await in 7 seconds

Elsewhere , , Leave a comment

Developing TV Apps with React-TV

TVs usually have limited graphics acceleration, single core CPUs and high memory usage for a common TV App. These restrictions make super responsive 60fps experiences especially tricky. React-TV is an ecosystem for React Applications on TVs. Includes a Renderer and … Continue reading

Elsewhere , , , Leave a comment

Cancel a JavaScript Promise with AbortController

In How to Cancel Your Promise Seva Zaikov has done a nice writeup on several techniques on how to cancel promises. After also touching generators and async/await the conclusion is that you can’t (you may introduce some workarounds to track … Continue reading

Original Content , , Leave a comment