Square Each Element in Array

Given an array of integers nums, return a new array where each element is the square of the original element.

Difficulty:

Console