IBM interview question

Find three bugs in a typescript function