Problems

Square Them All

EasyArrays & Objects

Read a JSON array of integers and print a JSON array of their squares (use map).

Input: one JSON array. Output: one JSON array.

Your program reads from stdin and prints to stdout.

Example 1

Input: [1,2,3]

Output: [1,4,9]

Hints

JavaScriptArray Methodsmap