Skip to content

Instantly share code, notes, and snippets.

View tomarpremveer's full-sized avatar
🔮
.

Premveer Tomar tomarpremveer

🔮
.
View GitHub Profile
@tomarpremveer
tomarpremveer / composing-software.md
Created January 21, 2021 11:01 — forked from rosario/composing-software.md
Eric Elliott's Composing Software Series
@tomarpremveer
tomarpremveer / c3.js
Created December 28, 2020 07:08
if you're concerned only about the presence of property and not what the value is
const obj = {
name:"github",
url:"github.com"
}
//to check if the color property is present on the object or not or it's value is null
if(obj.color === null || obj.color === undefined){
console.log("this propery is not present on the obj")
}
// you can do this like this way
@tomarpremveer
tomarpremveer / c2.js
Created December 28, 2020 06:59
null and undefined are coerced to each other during comparion
null == undefined // true
@tomarpremveer
tomarpremveer / c1.js
Last active December 28, 2020 06:15
If type of the datatype of the varibles involved in comparison are equal the double equals and triple equals are equal.
var a = 1
var b = 1
a == b // true
a === b //true