So I am trying to understanding the every method.
I wrote the following and it keeps bringing back “false,” but I believe it should be “true.”
let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
let result = array.every((element, i, arr) => element < arr[i + 1])
I’m assuming I’m doing something super stupid. Just wondering what it is?
Thanks for your help.
Edit: Thank everyone that took the time to reply. I appreciate it!