Test case details

Preparation Code

function generateData(size) { return Array.from({ length: size }, (_, i) => i); } const arr = generateData(1000000); const TAKE_NO = Math.floor(Math.random() * 5000); const DROP_NO = Math.floor(Math.random() * 1000);
// console.log(arr_res.length == iter_res.length ? 'CORRECT' : 'UNEQUAL DATA PASSED')

Test cases

Test #1

const arr_res = arr.map(el => el *3).slice(10,5)

Test #2

const iter_res = arr.values().map(el => el *3).drop(10).take(5).toArray()