Hard to figure what imperative code is

Hello fellow coders,

2 issues on my end:

  1. The var Window looks very much like a constructor . Is that an anonymous constructor? What’s the point of using this rather than a regular constructor format?

  2. I’m not sure I’m getting the philosophy of this lesson.
    Not sure what the result would have been using imperative code here? It’s just hard for me to figure it out just based on the current material.

Again big thanks to the community and to the builders of FFC. This is one of the greatest stuff out there on the web!

Challenge: Understand the Hazards of Using Imperative Code

Link to the challenge:

can you figure out what is the issue with the output and what is the wanted output instead?