Void common pattern to prevent the function's return value from being used prevents accidental use of the function's return value const getNumber = () => { return 1 } const num1 = getNumber() const num2 = void getNumber() console.log(num1) // 1 console.log(num2) // undefined