Thanh Hoan
New member
What will be the output of the following JavaScript code?
A. 10
B. 27
C. 8
D. 0
Code:
var grade='A';
var result;
switch(grade)
{
case 'A':
result+="10";
case 'B':
result+=" 9";
case 'C':
result+=" 8";
default:
result+=" 0";
}
document.write(result);
B. 27
C. 8
D. 0