JS Identifier Check (ASCII)

JavaScript Hard 4 views
Back to Questions

Problem Description

One string is given. Print YES if it is a valid JavaScript identifier using only ASCII rules: first char is letter/_/$, next chars are letters/digits/_/$. Otherwise NO.

Input Format

One line string.

Output Format

YES or NO.

Sample Test Case

Input:
my_var2
Output:
YES

Constraints

Length up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev