i have the fucntion correct but getting tripped up on syntax. i looked at the answer and it looks perfect to me. thanks in advance
You forgot to return
the default case. If you would call your function:
console.log(tipCalculator('invalid', 100))
you see undefined while you should see 18
testing your code is important