In this example, we have the following map:
KeyValue
OHOhio
AKAlaska
IAIowa
We claim that the value for key AK is Alaska. This proof iterates through the entries in the map. The first key is OH, which doesn't match AK, so we pop this entry. The first key in the map is now AK. This matches the key we are looking for, and the value for this key is "Alaska." Thus, we conclude that "AK" maps to "Alaska."

Quiz (1 point)

Prove that:
value at "AK" in map [ entry "OH": "Ohio", [ entry "AK": "Alaska", [ entry "IA": "Iowa", [ ] ] ] ] = "Alaska"

The following properties may be helpful:

Please write your proof in the table below. Each row should contain one claim. The last claim is the statement that you are trying to prove.

Step Claim Reason (optional) Error Message (if any)
1
2
3
4
5
6
7
8
9
10

Become a subscriber to save your progress, see the correct answer, and more!