for loop & JavaScript

Looping is the most familiar concept in the arena of programming. One of the most basic and most used programming syntax. Throughout this article we will see the different way to loop through array and objects in JavaScript. Computer science is the science of trade-offs and that will our focus while going through various possibilities.Continue reading “for loop & JavaScript”

React Unit-testing – Finding DOM Elements

Writing unit-tests for your React components are important, but it also important that tests are robust. Brittle tests are not maintainable & cause frustration to developers. This post addresses once such scenario that can cause brittle unit-tests, which is finding the nodes or DOM elements. Let’s work on making them robust. DOM elements are identifiedContinue reading “React Unit-testing – Finding DOM Elements”

Equality Gotchas – JavaScript

Type coercion is one of the very interesting concept to understand in JavaScript. To delve deep into the understanding of this concept let us first evaluate few conditional statements into the console of google chrome (or you can use node or any suitable method to evaluation these conditions. You will have to modify your codeContinue reading “Equality Gotchas – JavaScript”

JavaScript – Data Types

Well, we all know that JavaScript is a functional language (which is an entirely a different discussion about being functional language) has some data types, namely: Number (not Integer) String Boolean null (Special value I would call it) undefined (Special value I would call it) Let’s talk about each of this data type in detail: Number:Continue reading “JavaScript – Data Types”