Practice
JavaScriptData StructuresReactConcepts
Sign in
← Back to problems

Simple Email Check

Beyond the Courseeasy

Implement `isEmail(s)` returning whether `s` looks like `[email protected]` (no spaces, exactly one at-sign, and a dot in the host part).

Sample tests

Input: isEmail("[email protected]")
Output: true
Input: isEmail("nope")
Output: false

+ 1 hidden test run on Submit.

Hints

Common pitfalls
  • A truly correct email regex is complex; this is a deliberately simple check.

Learning resources

  • MDN: Regular expressions
Approach & explanation (try first)

The anchored pattern enforces [email protected] shape without spaces, good enough for basic validation.

Loading...
⌘/Ctrl + Enter

Run your code to see results.