xxxxxxxxxx
function sortedSquaredArray(array) {
// Write your code here.
array
var newArray = [];
for(let i in array){
newArray.push(array[i]*array[i])
}
return newArray.sort((a,b)=>a-b);
}
console.log(sortedSquaredArray([-7, -3, 1, 9, 22, 30]))