Exercise 1: What $x = MyFunc Actually Assigns — Possible Solution ==================================================================== WHY $x IS NOT JUST 42 ------------------------------ Per this chapter's central finding, every uncaptured line inside a function joins that function's return value - not just whatever follows return. Write-Output "Starting..." was never captured, assigned, or redirected, so it becomes a real, permanent part of what the function returns, exactly the same way Write-Output "about to double $n" became part of Get-Doubled's own return value in this chapter's own example. $x = MyFunc therefore assigns an array holding BOTH values - "Starting..." followed by 42 - not just the number 42 alone. CONNECTING IT TO GET-DOUBLED ------------------------------ This chapter's Get-Doubled example demonstrated the identical pattern: $result = Get-Doubled -n 5 produced a two-element result ("about to double 5" and 10), confirmed by checking $result.Count and getting 2, not 1. MyFunc's Write-Output "Starting..." plus return 42 is structurally the same situation - one uncaptured status message plus one final value, combined into a single two-element output. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly rejects the assumption that $x holds only 42, correctly identifies that the Write-Output call also becomes part of the return value, and correctly draws the parallel to this chapter's own Get-Doubled example rather than treating the two as unrelated.