What does the 'for (let number of numbers) mean & do in this block of code ? Screenshot_20200102-132914|281x500
Never mind, jumped the gun sorry! I just re-read it & I’d missed the obvious
So what did u do after this? Where did u put the return string? I am not able to do i got the same
please help im stuck
Add a 3rd return that returns the string 'far'
if no other returns run.
YOUR CODE
function
distance
(
x
,
)
{
if
(
x
===
0
)
{
return
‘here’
;
}
if
(
x
<
5
)
{
return
‘close’
;
}
}
;
play_arrow Run Code
YOUR KEYS undo redo backspace
if
return
function() {}
distance()
x
num
str
◂ <
◂ ===
Hey there, try posting a screenshot of your code, rather than copy/pasting it (which messes up the formatting and makes it very difficult to read).
Thanks,
Ben