You are trying to access the element with id leftSide
before it has been added to the DOM.
If you move your script to the end of the page body, you will no longer see this error, but a different, unrelated one instead:
Face Matching Game
Matching Game
Click on the EXTRA face on the left side