December 22, 2024

Answer to Collections Q7

 

Here are three possible solutions.

  1. airDisasters do: [:when| Dialog
       warn: when printString]
  2. airDisasters keysAndValuesDo: [:plane :when| Dialog
       warn: (airDisasters at: plane) printString]
  3. airDisasters keysAndValuesDo: [:plane :when| Dialog
       warn: when printString]

 

Back to « Collection Questions 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Up to top of page