-2

(The challenge reads like this)

Create a function expression named getNumberAr with no parameters

The getNumberAr function should return an array of 5 numbers

Call getNumberAr and store its result into a variable called numbers

So far I have created the function and not much else, looked through related post but could not put it together.

    function getNumberAr()
    {

    }

1 Answer 1

-1

Think I got it !

const getNumberAr = function () {
    return [1, 2, 3, 4, 5];
    }

    const numbers = getNumberAr();
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.