This video explains __proto__ in JavaScript in less than 5 minutes https://www.youtube.com/watch?v=hB7lNOCN2e8&feature=youtu.be
Monthly Archives: November 2020
Union and Intersection of types in TypeScript
Do you know, TypeScript allows union and Intersection of types? Why you need that? Let us assume you need to create a function that checks whether the passed value is boolean true and returns true, otherwise returns null. That function may look like below, function trueOrNull(foo: any): any { if (foo === true) { return true; } return undefined; } console.log(trueOrNull(88)); // null As you see, theContinueContinue reading “Union and Intersection of types in TypeScript”