Edit in JSFiddle


              

              
let x = -1;

const toggleNumber = () => x = -x;

console.log(toggleNumber(), toggleNumber(), toggleNumber(), toggleNumber());