Skip to content

Eileen Cuevas - #422

Open
eileencuevas wants to merge 5 commits into
bloominstituteoftechnology:masterfrom
eileencuevas:master
Open

Eileen Cuevas#422
eileencuevas wants to merge 5 commits into
bloominstituteoftechnology:masterfrom
eileencuevas:master

Conversation

@eileencuevas

Copy link
Copy Markdown

No description provided.

Comment thread assignments/callbacks.js
let noDupes = [];

noDupes = array.filter(function(item, index) {
return index <= array.indexOf(item);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in case you didn't already know the reason this works is because indexOf returns -1 if the argument isn't in the array upon which the method is invoked. .includes() is probably the best tool for this, or Set.

Great job though.

Comment thread assignments/closure.js
function currentMoney(name) {
const sentence = 'your wallet has this much in it:'

function createStatement() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect

Comment thread assignments/closure.js
// Return a function that when invoked increments and returns a counter variable.
let count = 0;

return () => (++count);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain why this works? ARE U SUUUUUREE?!?!?!?!?!?!?!?!!?

mwhahaha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants