Hello,
I have a code from exercise: Introduction to Javascript/Array in functions
const concept = ['arrays', 'can', 'be', 'mutated'];
function changeArr(arr){
arr[3] = 'MUTATED';
}
function removeElement(newArr) {
newArr.pop();
}
console.log(removeElement(concept));
console.log(concept);
And then I run it I see results like this:
undefined
[ 'arrays', 'can', 'be' ]
I want ask why I can’t print data while I call method removeElement(); on .log();?