r/JavaScriptTips • • Jul 22 '23

Can anyone help me quick ?

Post image
1 Upvotes

4 comments sorted by

1

u/J-Flash6 Jul 22 '23

I almost finished now but thank you guys

1

u/[deleted] Jul 22 '23

What do you need help with exactly? Just solving the question in general?

All you'll need is an if(condition) and this: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof

1

u/slam_the_damn_door Jul 22 '23

You can use typeof operator to check if its a string or number

1

u/[deleted] Jul 22 '23

Is this homework?