Explore Library
FlashcardIntermediate

Assertion Functions (asserts)

Functions with an 'asserts' return signature narrow types by throwing on failure.

Question

What is an assertion function using the 'asserts' keyword?

Click to reveal answer