current index value js code example
Example 1: how to find the index of a value in an array in javascript
var list = ["apple","banana","orange"]
var index_of_apple = list.indexOf("apple") // 0
Example 2: js index to index
let array = [5, "Foo", 3, "Bar"];
array.slice(2);
// Output = [3, "Bar"]
let string = "Volvo Cars";
string.slice(2);
// Output = "lvo cars"