Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Five Foot Jonah the Zoo Keeper #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonahroth
Copy link

@maxdignan @kmodlich This was tricky because I'm trying to store different formats as functions and I didn't realize how this works in Javascript

function(name) { return name + " " + rnd(this.last_names); },
function(name) { return rnd(this.first_names) + " " + name.charAt(0).toUpperCase(); }
];
var formatter = rnd(formats).bind(this);

Choose a reason for hiding this comment

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

Check out using apply in this case instead of bind - this way you can do 46 and 47 in one line.

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