Search code snippets, questions, articles...
const user_name = null ?? 'Ankit';
// Output: "Ankit"
const number = 0 ?? 40;
// Output: 0
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
If left side value of ?? is not undefined or null it will take that as a value.