codingforeveryone/js

New-member-12

Closed this issue · 2 comments

Write a function that checks whether all elements in an array are square numbers. The function should be able to take any number of array elements.

Your function should return true if all elements in the array are square numbers and false if not.

An empty array should return undefined.

Examples:
isSquare([1, 4, 9, 16]);
//returns true

isSquare([3, 4, 7, 9]);
//returns false

isSquare([]);
//returns undefined

I'll take this one

Closing as problem has been solved & merged.