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.

  1. Split the string exactly on the space character (" ").
  2. Return the resulting array of individual words.

01EXAMPLE 1

Inputsentence = "Hello World"
Output["Hello", "World"]

Constraints

  • Split by a single space character.
CoreStringsArrays
JavaScript
Loading...
3 Hidden

Input Arguments

sentence"JavaScript is fun"

Expected Output

["JavaScript","is","fun"]

Click RUN to test your solution