Given:
console.log(boo); this outputs undefined
Given:
var boo = 1;
console.log(boo); this outputs 1
Aft
Use the void operator. It will evaluate it's expression and then return undefined. It's idiomatic to use void 0 to assign a variable to undefined
var boo = 1; // boo is 1
boo = void 0; // boo is now undefined
Learn more here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void