I couldn’t get it. My opinion is that the video is correct, and the video and your solution are the same, which both are correct.
Am I missing something? Could you be so kind as to explain in a little bit more detail?
It is not intended that you exactly copy the videos character for character. The content in the video is relevant, but the challenge has been updated since the filming of the video. This means that you need to read the challenge and think about how the discussion in the video can help you build the correct solution for yourself.
In this case, the challenge has been updated so that it does not use global variables. You generally want to avoid global variables when possible.