Consider following code snippet:

var ch1 = 'b';
var ch2;
switch(ch1) {
  case 'a':
     ch2 = '1';
  case 'b':
     ch2 = '2';
  case 'c':
     ch2 = '3';
     break;
  default:
     ch2 = '4';
}
What will be the value of ch2 variable?
Explanation
There is no break keyword in the case that match the conditions.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести