Hi Jayo,
No, the trailing "}" is to close the opening "{" which was added at the end of first line. If you have a closer look at the original code, you'll observe that there is no "{" or "}". I've introduced a new line within the "if" statement and thought I should wrap it within curly brackets.
In your post, what you've quoted as the "original code" is not the original code. The original code does not have the trailing "}".
Hope that makes sense?