Do you know what will be the output of this code?
JavaScript
console.log(JSON.stringify({ a: undefined, b: null, c: () => 1 }));
Show answer and explanation
The answer is {"b":null}.
JSON supports null but not undefined or functions. Object properties with those values are left out. Inside arrays they become null instead.