The Tokenizer
Medium+25 XP
Mission Briefing
The transmission arrived as one solid block of text! The translation matrix needs the data broken down into individual, recognizable words before it can process anything.
The Concept: String Conversion
The .split(separator) method breaks a single string into a full Array based on a specific "separator" character that you define.
Example:
const list = "A,B,C"; const arr = list.split(","); // Returns ["A", "B", "C"]
The Objective
Your function receives a sentence where words are separated by spaces.
- Split the string exactly on the space character (
" "). - Return the resulting array of individual words.
01EXAMPLE 1
Input
sentence = "Hello World"Output
["Hello", "World"]Constraints
- Split by a single space character.
CoreStringsArrays
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
sentence"JavaScript is fun"
Expected Output
["JavaScript","is","fun"]
Click RUN to test your solution