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

fix argument name bug #9

Open
smcalilly opened this issue Mar 17, 2021 · 1 comment
Open

fix argument name bug #9

smcalilly opened this issue Mar 17, 2021 · 1 comment

Comments

@smcalilly
Copy link
Owner

This is nitpicky, but in your repl illustration you're using the word "cat" In the function name and the "kitty" in the constant name. "Cat" and "Kitty" are basically two words that mean the same thing, but what you're really trying to express is that the constant is a particular cat. "Kitty" doesn't really convey that so maybe the constant name should be "myFavoriteCat" or "myCat" or something like that??

function sayNameAndAge(cat) {
  return console.log(`My name is ${cat.name}. I am ${cat.age} years old.`)
}

const kitty = {
  "name": "Sylvia",
  "age": 6
}

// prints "My name is Sylvia. I am 6 years old."
sayNameAndAge(kitty)
@smcalilly
Copy link
Owner Author

good catch, thank you @leemcalilly

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

No branches or pull requests

1 participant