Exercise in Strictness

The code below compiles with the strict flag set to false. Adjust it so that it compiles when strict is set to true as well.

After you have resolved all compiler errors, can you spot some other issues with the code? Can it still throw runtime errors?

Note that the system can only verify that your code compiles without errors. To check your solution, click on Show solution and compare the code.

Get hands-on with 1200+ tech skills courses.