Ní thacaítear leis an mbrabhsálaí seo a thuilleadh.
Uasghrádú go Microsoft Edge chun leas a bhaint as na gnéithe is déanaí, nuashonruithe slándála, agus tacaíocht theicniúil.
When is it appropriate to use a switch-case construct rather than a if-elseif-else construct?
switch-case
if-elseif-else
A switch-case construct is appropriate when more than 2-3 else if code blocks are required.
else if
A switch-case construct is appropriate when the number of case patterns is small.
case
A switch-case construct is appropriate when the selection statement is inside a loop.
Why should a developer choose a for statement rather than a foreach statement when processing the contents of a multidimensional array?
for
foreach
for statements do a better job of examining each array item separately.
foreach statements do a better job of examining each array item separately.
for statements enable a developer to treat array dimensions separately.
Why is it important to scope a variable at its lowest necessary level?
It ensures that a variable that's declared outside of a code block, can be accessed inside the code block before it's been assigned a value.
It ensures that application resources and the security footprint are kept small.
It ensures that a variable can be accessed within the lowest level code branches of an application.
You must answer all questions before checking your work.
An raibh an leathanach seo ina chabhair?
An bhfuil cabhair uait leis an ábhar seo?
Ar mhaith leat triail a bhaint as Ask Learn chun soiléiriú nó chun thú a threorú tríd an ábhar seo?