Plain Object Flags

JavaScript Medium 4 views
Back to Questions

Problem Description

You get a JSON array. For each item print PLAIN if it is a plain object (typeof object, not null, not array). Else print NO. One output per line.

Input Format

One line JSON array.

Output Format

n lines outputs.

Sample Test Case

Input:
[{},[],null,{"a":1},1]
Output:
PLAIN NO NO PLAIN NO

Constraints

Array length up to 2e5.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next