Free Code Camp 2016: 20 Hours! 301 Waypoints
While trying to power through, I came across minor stability and indexing issues ( 2/17 ) .
This minor irritation occurs every time I complete a challenge and the following challenge is New! It could be related something of not being able to populate my old answers or what not.
One thing that was tripping me up was the array.join() method.
I never seem to remember to how use this built-in method. I’d like to believe that its my python background thats getting me confused.
Thinking through this example slowly, the code above is a string operation being applied to an array. What we want:
This is an array operation that takes a string as an argument and produces a string. I don’t have a good way to remember this, thank heavens for google and stackoverflow.
- update the collection
- update elements of the array in the collection
- delete properties
What took me so long was that I wasn’t using all the parameters upfront. You are given (id, prop, value) and I was ignoring id. FAIL! After realizing that, the rest was simple. Some notation takeaways:
- use bracket notation for variable properties and properties containing characters or spaces.
WARNING: if you return in a function, the function exits and the code beneath is rendered void.
So to fix the issue, I simply moved the return statement to be the last line of the function definition. Hope that helps.
I’ll working on reclaiming my basic certification. This requires completing a new Tribute Page project as well a the Caesars Cipher algorithm. Until next time campers!