Putting it all together puzzle of interviewing part


I am having a error In the end of the puzzle which is “cannot read properties of undefined(reading ‘a’)”