View Single Post
  #10  
Old 14.10.2019, 18:14
Demongornot Demongornot is offline
JD Beta
 
Join Date: Sep 2019
Location: Universe, Local group, Milky Way, Solar System, Earth, France
Posts: 50
Default

I am retrofitting my script prototype with your code !
So if I understand, we can use a condition with "return" to return the data passed as argument in the function when the condition is true ?
I never thought we could use the filter method like that !
I would be more familiar with :
array.filter(word => word.toString().indexOf(host) > -1).reverse();
But it doesn't work in JD, so I guess there is no other way to do it as a method.
Reply With Quote