I’m confused by execution of switch statement in javascript [closed]

I’m a little confused with the below code, it is printing step 3 to the console

let switch; 
switch('abc'){
  case('abc'): 
    switch = 'step 1';
  case('def'): 
    switch = 'step 2';
  default: 
    switch = 'step 3';
}
console.log(switch);

Answer

In switch without break statement after each case, it will execute the other cases as well and will finally assign the value in default, which is the reason why it is printing default value all the time