Is there any difference between these two? From what I am seeing the result is being the same. When should I use each of these?
const item = null
const test = item || "hey"
const test2 = item ?? "hey2"
console.log(test, test2)
Is there any difference between these two? From what I am seeing the result is being the same. When should I use each of these?
const item = null
const test = item || "hey"
const test2 = item ?? "hey2"
console.log(test, test2)