GoConqr has a new look! Let us know what you think.

Module 21 of 35 · Text

#21

welligton costa

/ *

Array getters

-------------------------

Conclua as funções abaixo para obter o primeiro e o último valores da matriz

* /

 

function first(arr) {

return; // complete esta declaração

}

function last(arr) {

return; // complete esta declaração

}

/*

DO NOT EDIT BELOW THIS LINE

--------------------------- */

var numbers = [1, 2, 3];

var names = ["Irina", "Ashleigh", "Mozafar", "Joe"];

console.log(first(numbers));

console.log(last(numbers));

console.log(last(names));

 

/ *

RESULTADO ESPERADO

---------------

1

3

Joe

* /

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?