just wondering why this boolean isn't changing each time I call the function in Codepen with babel.
let status = true;
let statusChange = () => {
status = !status;
return `new status: ${status}`;
}
console.log(statusChange());
console.log(statusChange());
console.log(statusChange());
console.log(statusChange());
console.log(statusChange());
You should see the console logs alternate between true and false. Am I going insane here..?