Skip to content

Instantly share code, notes, and snippets.

Avatar
🔮
.

Premveer Tomar tomarpremveer

🔮
.
View GitHub Profile
@tomarpremveer
tomarpremveer / composing-software.md
Created Jan 21, 2021 — forked from rosario/composing-software.md
Eric Elliott's Composing Software Series
@tomarpremveer
tomarpremveer / c3.js
Created Dec 28, 2020
if you're concerned only about the presence of property and not what the value is
View c3.js
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 Dec 28, 2020
null and undefined are coerced to each other during comparion
View c2.js
null == undefined // true
@tomarpremveer
tomarpremveer / c1.js
Last active Dec 28, 2020
If type of the datatype of the varibles involved in comparison are equal the double equals and triple equals are equal.
View c1.js
var a = 1
var b = 1
a == b // true
a === b //true