Tran Sang Dev Blog
  • HOME
  • Meta Programming
  • Javascript
  • bash
Subscribe

javascript

A collection of 3 posts
Javascript equality and sameness
javascript

Javascript equality and sameness

This is the second post in my Javascript serial [https://transang.me/tag/javascript/]. There are 3 types of comparison operators in Javascript * === (most recommend): strict comparison or identity comparison * == (not recommend): loose comparison * Object.is api [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is]
Sep 30, 2019 — 3 min read
Javascript Primitives
javascript

Javascript Primitives

Javascript is a very widely used and extremely useful language due to its dynamic. However, there are a lot of concepts in javascript which make developers confused such as data type, class, method inheritance. In this post, I will introduce primitive types in Javascript and related topics. -------------------------------------------------------------------------------- Definition What
Sep 29, 2019 — 3 min read
Promise based semaphore pattern in Javascript
programming

Promise based semaphore pattern in Javascript

Let's start with a singleton pattern when you want to instantiate at most one instance of a class, or lazily initiate a value. let instance const getInstance = () => instance === undefined ? instance = initiateInstance()//this is a heavy task and should be done at most once in the whole life of the application
Jul 5, 2019 — 1 min read
Tran Sang Dev Blog © 2023