Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Matthew Toczek
Matthew Toczek
8,266 Points

err and response - Keywords?

The use of err and response within catch() and then() respectively is confusing me a little - are these keywords, or are they just being used as local variables? Could you use any word to replace these?

1 Answer

Brandon Evans
Brandon Evans
8,154 Points

Hey Matthew!

Someone can correct me if I am wrong, although you should be 100% correct in the err being a simple variable, so technically you could use any variable there you would like, although you will almost always see err or even sometimes error when handling errors. Personally, I am not sure if I've ever seen any sort of error handling in JS that uses anything other than err or error.

Hope this helps! :)