The handleClick method in( https://codepen.io/Snowd3n/pen/yqGaVm) starts:
handleClick = (buttonName) => {
switch(true){
case buttonName === "0" || etc.
I’m familiar so far with methods that start:
handleClick(event)
{
do x, y and z
}
It looks like the handleClick method is taking the value of ‘buttonName’ from the button that’s been clicked, and using it in a subsequent method which contains a select case statement.
Also, I don’t understand why switch has an argument set to true: switch(true).
Basically, this code syntax is unfamiliar to me. Could anyone explain or provide a link to an explanation. Thank you.