crop_rotate
Run
<!DOCTYPE html> <html> <body> <h2>JavaScript Array.findIndex()</h2> <script> const numbers = [4, 9, 16, 25, 29]; document.write("First number over 18 has index " + numbers.findIndex(myFunction)); function myFunction(value, index, array) { return value > 18; } </script> </body> </html>
PCFET0NUWVBFIGh0bWw+DQo8aHRtbD4NCjxib2R5Pg0KDQo8aDI+SmF2YVNjcmlwdCBBcnJheS5maW5kSW5kZXgoKTwvaDI+DQo8c2NyaXB0Pg0KY29uc3QgbnVtYmVycyA9IFs0LCA5LCAxNiwgMjUsIDI5XTsNCg0KZG9jdW1lbnQud3JpdGUoIkZpcnN0IG51bWJlciBvdmVyIDE4IGhhcyBpbmRleCAiICsgbnVtYmVycy5maW5kSW5kZXgobXlGdW5jdGlvbikpOw0KZnVuY3Rpb24gbXlGdW5jdGlvbih2YWx1ZSwgaW5kZXgsIGFycmF5KSB7DQogIHJldHVybiB2YWx1ZSA+IDE4Ow0KfQ0KPC9zY3JpcHQ+DQoNCjwvYm9keT4NCjwvaHRtbD4=