please refer to line 2 after comment. this issue is mentioned in the code in comments.
//valid input to be taken by user var validanswerone = ["yes"