Skip to content
This repository was archived by the owner on Jun 19, 2026. It is now read-only.

Latest commit

 

History

History
13 lines (8 loc) · 229 Bytes

File metadata and controls

13 lines (8 loc) · 229 Bytes

countWords()

Overview

Counts the number of words in a given string.

Code

A screenshot of the titular code snippet

const countWords = (string) => string.split(" ").length;