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!

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

John French
John French
4,092 Points

flickerAPI vs flickrOptions?

Not so much a development question, just a clarification. Is there naming logic I am missing to spell "flickerAPI" differently than "flickrOptions" ?

Is this simply to make them more distinct for students?

3 Answers

Hi John,

The naming convention used here is called camel case. The first word is lowercase and then each word after that is capitalized. This is what's happening with flickrOptions and that 3rd argument in the code displayPhotos

flickrAPI is similar but slightly different. API isn't a word like Options or Photos.

It's an abbreviation for Application Programming Interface. Each letter represents a word and so you will commonly see API in all capitals.

Update: the question was really about the spelling of "flicker" and "flickr" in the variables.

That could possibly be a typo. flickr spells it without the 'e'. It doesn't affect the functioning of the program though.

I think Dave McFarland is the only one that would know for sure.

John French
John French
4,092 Points

I am sorry - maybe my question wasn't clear. I understand the rationale behind camel case, but what I was referring to was the spelling of "flicker" versus "flickr." Not a super important questions, just curious if it was intentional or a typo in this course. Dave doesn't strike me as the type of instructor to do things on accident.

Sorry, I completely missed the fact that one had the 'e' and the other didn't .

I'll leave my original answer intact in case anyone finds it useful but I'll add on to it.

John French
John French
4,092 Points

Oh, but thank you, Jason, for your reply!