I have 2 arrays that both need to run forEach.
[267, 418, 568].forEach((item, idx) => item * 17 + idx)
[123, 234, 345].forEach((item, idx) => item * 17 + idx)
To reduce repetition, I'd like to replace the callback with an external function.
something like
const otherFunc = (item, idx) => {
return item * 17 + idx
}
[123, 234, 345].forEach(otherFunc(item, idx))
What's the syntax for doing such?