Be My Neighbor explainer

Finish is in the bottom middle and green

Hi please tell me what is wrong, screenshot:

hi ben you can please help me with this code

import

{

array

,

index

}

from

‘grasshopper.arrayFactory’

;

function

getNeighbor

(

arr

,

i

,


)

{

let

neighbor

=

i

1

;

return

arr

=

neighbor

;

}

;

console

.

log

(

'The neighbor to ’

array

[

index

]

’ is ’

getNeighbor

(


,


)

)

;

Can you please help me

Help, please!


What is wrong with this code please?

HELP ME PLES i can do it :disappointed_relieved: :disappointed_relieved:

never mind i got it i was not reading what it was saying to do

I just want to know why return … and not return i

I am unable to make “arr[]” whenever I try, the arr is replaced with the [] …instead of going infront of it.

There are two []

the one you want is purple
the wrong one is yellow.


I can’t seem to get the code to work and I’m not sure what I am doing wrong. Please help

Try this code

I did not undrestand why there is two pickrandom