What is diffrence made by insertion of quotes?


Hello All,

When I return a true/false value without double quotes , code works

However ,if I return a true/false value with double quotes , code throws error i.e
Oops, try again. Your function returns true for 3!

Why do quotes insertion cause this ?
And y does return statement under else if condition with quotes doesnt throw error

Kindly guide me.
Thank You




true and false are Booleans, they don't need quotes.

Strings use quotes

Read more - CodeCademy glossary


Oh ! I see.
Thankyou Zainabrawat.:relaxed:


No problem, you're welcome !
Happy Learning :slightly_smiling:
Happy coding !

What inspired you to learn programming ?
Join the discussion