The Text Meter
Easy+15 XP
Mission Briefing
The Grand Scribe needs to know exactly how much ink to allocate for a new manuscript. You must build a text meter to count every single letter!
The Concept: String Basics
Just like arrays, strings have a .length property that corresponds to how many characters they contain. This counts everything: letters, numbers, spaces, and even punctuation!
Example: "Hello!".length; // Evaluates to 6
The Objective
Your function receives a string message.
- Retrieve the total character count of the string using the
.lengthproperty. - Return that number.
01EXAMPLE 1
Input
message = "Code!"Output
5Constraints
- Return the length as a number.
FundamentalsStrings
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
message"Magic"
Expected Output
5
Click RUN to test your solution