Recalling the Last Value
Sometimes easily recovering the previous command is exactly what you need. But
what if you want to recall the result of the previous command?
Before you do anything else, try typing an underscore (_
, shift + the dash/minus
key) and pressing Enter
.
What happened? What do you think undefined
means?
Now try typing in a number, pressing enter, and then typing an underscore...
What happened when you pressed enter this time?
Let's try two more experiments. First, try doing a simple calculation and then
typing an underscore and pressing enter:
Did you expect that?
Finally, try using the underscore in a calculation:
Before you press enter, predict what you think will happen.
_Hint: consider what value _
had in your previous experiment._
Were you right? Explain to yourself what that underscore character is doing and
why it might be useful. When you're ready, click the ✓ button.