Help Everyone. I am a grasshopper user and can’t know how to code very well. Please help me.
The code is
function distance( x, ___ ) {
if ( x === 0 ) {
return ‘here’ ;
}
if ( x < 5 ) {
return ‘close’ ;
And i add after the line }
if ( x < 10 ) {
return ‘far’ ;
Help, no Reveal solution in there. Please help me. What is the hint.
1 Like
Hey there,
In this puzzle, you won’t need to add another if statement. Just add return 'far'
at the end of the function, like this:
function distance(x) {
if (x === 0) {
return 'here';
}
if (x < 5) {
return 'close';
}
return 'far'
}
Hope this helps!
Ben
5 Likes
Thanks Ben. Thank you. It was really hard for me.
1 Like
Of course! You’re doing great. Let me know if you have any other questions.
Ben
i also have problem this before thank
**Thanks Ben ** It really helped me a lot. I was stuck to this from 2 days