Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
double-list-imperative.js
const doubleList = list => {
const newList = [];
for (var i = 0; i < list.length; i++) {
newList[i] = list[i] * 2;
}
return newList;
};
@pablopaul

This comment has been minimized.

Copy link

@pablopaul pablopaul commented Sep 8, 2020

@ericelliot why using var over let in line 3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.