In Aug 1947, two nations born, one Pakistan on 14th Aug, 1947 and other India on 15th Aug, 1947. A single nation divided into two on basis of religion and since then has a decorated history.
But this post is about how these nations got independence and giving some credit of independence to a factor which is not much discussed or talked about.
Before starting, Lets discuss a bit about colonization or colonisation, It is the process of claiming and establishing colonies(A colony is a territory subject to a form of foreign rule.). Modern colinization refers mostly to Western European…
How to read a property from and object and use a fallback if its missing ?
// instead of implementing like below
// const fn = (defVal, propName, obj) => (obj && obj[propName]) || defVal;
// console.log(fn(-1, 'a', {})) // -1
// console.log(fn(-1, 'a', { a: 100 })) // 100//prefer
console.log(propOr(-1, 'a', {})) // -1
console.log(propOr(-1, 'a', { a: 100 })) // 100
How to read deeply nested property ?
const obj = { a: { b: { c: 1 } } }; // instead of implementing something like this // const fn = item => item && item.a…
While we are fighting this pandemic, it gives me opportunity to share my journey so far with Vue. I have decided to write a daily note on Vue and share my experience so far. Will take one step at a time.
Vue is one of the leading front end framework to develop web applications. Other leading front end frameworks are react, angular & svelte.
So in this we will look into what is declarative rendering in vue ?
// html template
<div id=’app’>{{name}}</div>// JS code const Name = { el:’#app’, name: ‘nameComponent’, data: { name: ‘Bond, James Bond’, }…
In computing, reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change. With this paradigm it is possible to express static (e.g., arrays) or dynamic (e.g., event emitters) data streams with ease, and also communicate that an inferred dependency within the associated execution model exists, which facilitates the automatic propagation of the changed data flow.
A datatype to rule over everything ;-)
Log the first 10 clicks on the right side of window.
Imperative
let clicks = 0; const clickHandler = e => { const { innerWidth: width } = window; const { clientX…
Imho, It changes the way you think and write program for greater good. So, give it a try and keep it simple. Fwiw, You may get lost on the roads of learning FP as it traces its roots with category theory and the ability to reason with the program using mathematical expressions. But if you can keep it simple and and move one step at a time, i think it’s worth it.
It meant a function
Storing function…
Programmer