Knowledge check

Completed

Check your knowledge

1.

When is it appropriate to use a switch-case construct rather than a if-elseif-else construct?

2.

Why should a developer choose a for statement rather than a foreach statement when processing the contents of a multidimensional array?

3.

Why is it important to scope a variable at its lowest necessary level?