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
Зарегистрируйся сейчас
или Подпишись на будущие тесты