Multiple choice technology

What will be the output of the below script? While (1) { $a = "something" if ($a –eq 1) {continue} break; Write-Host $a }

  1. Something

  2. 1

  3. Error

  4. No output

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The break statement immediately exits the while loop before Write-Host executes. The condition ($a -eq 1) is never true because $a is a string 'something', not the integer 1, so continue is never reached. The break executes on the first iteration, terminating the loop without any output.