String vs Number Quiz
Multiple Choice Beginner
Question
What is the data type of the value `"42"` (with quotes)?
Hint
The quotes make all the difference.
Explanation
Even though 42 looks like a number, the surrounding quotes make it a string. "42" is text, not a numeric value. You cannot do arithmetic with it directly — "42" + 1 gives "421" (concatenation), not 43.
Related Resources
Related Lessons
- Data Types
Learn about the fundamental data types in programming.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.