Is spacing required when writing bash scripts?

In this lesson, I wrote an if statement and ran it on the shell prompt, but it gives me an error that says, “…command not found” even though the result was displayed.

But when I include spaces after the opening square bracket and before the closing square bracket, the error goes away.

When writing bash scripts, is spacing required?

Myself @noblekc I get in the habit of adding them and then I don’t have to worry about. That is an interesting error you mention, Thank you