const number = Number(prompt('How many people?')); if(number){ } When the user clicks "Cancel" in prompt(), it returns null. Since Number(null) results in 0, number is set to 0. This behaviour can be observed directly in the console. Before understa...
garamyoon.hashnode.dev1 min readNo responses yet.