Understanding scope is key to mastering variables. var is function-scoped (or global), while let and const are block-scoped (only exist inside {}).
if block:
blockScoped using let and set it to "I am safe"leakyVar using var and set it to "I leak out"}):
leakyVar to a variable capturedLeak (it should still exist!)blockScoped to capturedBlock (it would error, so just set capturedBlock to "Error caught" string for this exercise)Submit your code to see test results