#javascript
Read more stories on Hashnode
Articles with this tag
I was in the middle of writing a unit test case for some service built-in JavaScript using Jest. We need to mock data instead of actually having a...
While working with React library, you already understand well that whenever any props value or state of that particular component changes then it...
Early Return Early Return is a pattern that suggests we avoid nested if-else statements by checking the preconditions and return or throw as early as...
1. Know it's an array or not const points = [23, 3, 89, 98, 40] // Before π console.log(points.length) // it returns true // After...
There are multiple ways to mock an event handler in Jest Testing Framework. I will discuss two different scenarios and further, we will introspect...
You can remove all βfalsyβ values from an Array by filtering for Boolean. const fruits = [ 'Apple', null, 'PineApple', undefined, ...