why does this for each only run once when the sea...
# suitescript
c
why does this for each only run once when the search result is 2 it should run two times but only runs one time
b
the answer is copying template code from an chrome extension that is spreading questionable search code
c
No the answer is that i did not return true at the end of the for each
but thanks
just figured it out
b
understand how the each callback works, and that returning nothing is the same as false
s
this is a recurring bug - anyone know why netsuite's
each
behaves differently (requiring a return value) than other well established languages/libraries?
b
its probably based on java iterator
which likes using a boolean to tell when it has a next element
s
ugh, another spot where the underlying java is allowed to leak through to our JS api
glad I generally don't use this
each
function - one less thing to remember