javascript-tutorial
Repos
63

Events

Created at 5 minutes ago
Created at 2 hours ago
Created at 2 hours ago
Created at 2 hours ago
Created at 3 hours ago
Created at 3 hours ago
Created at 4 hours ago
👾 add clarifying example

I think it's worth adding this example, because the first time it confused me a little

I also think it's worth writing it down better somehow. Because the introduction of a new array in the example, which besides stand out of the whole article, is not good decide

Maybe it would look better:

let arr = [1, 0, false, 1];

alert( arr.indexOf(0) ); // 1
alert( arr.indexOf(false) ); // 2
alert( arr.indexOf(null) ); // -1

// note that the lastIndexOf method looks for from the end, but index counted from the beginning
alert( arr.lastIndexOf(1)) // 3

alert( arr.includes(1) ); // true
Created at 4 hours ago
Created at 4 hours ago
Created at 4 hours ago
Created at 4 hours ago
Created at 4 hours ago
👾 added specifying information to the symbol `Symbol.isConcatSpreadable`
Created at 5 hours ago
Created at 5 hours ago
👾 fix typo
Created at 6 hours ago
👾fix typo
Created at 6 hours ago
Created at 7 hours ago
Created at 7 hours ago
Created at 7 hours ago
Created at 7 hours ago
Created at 8 hours ago
Created at 8 hours ago
Created at 9 hours ago
Created at 9 hours ago
Created at 9 hours ago