Cash Register lesson in Codecademy

While completing the Cash Register (step 3/7) exercise on Codecademy’s JavaScript course, I came across this answer from tony de araujo that helped me understand how the code I was writing was executed.

alt text

On line 29 we call the scan method from object cashRegister and pass in an item called “eggs”

“eggs” gets inserted into the function via the input parameter item which is an interface.

For this function call instance, “eggs” becomes the value of variable item.

The switch switches the case “eggs” to true, which triggers the function add on line 4 and the value of 0.98 is added to variable total on line 2.

In truth, the program only starts executing at line 29. All the stuff above line 29 is preliminary data that JavaScript will use once it starts running the program. What I mean is that JavaScript scans the program once and it makes an inventory of what is supposed to do. Then, it starts running at line 29 and downward.


Free Code Camp

A friend recommended a new free coding resource for learning full-stack development called Free Code Camp. I’ve been trying out their lessons the past two days to see how they are. I’m very impressed with their community, network, organization, and support. They don’t teach Ruby and Ruby on Rails, which is what I’ve been learning the past few months. Instead they focus more on JavaScript and Node.js.

This is what their curriculum looks like:

800 Hours of Practice:

    800 Hours of  Real World Work Experience:

  • 100-hour Nonprofit Project
  • 200-hour Nonprofit Project #1
  • 200-hour Nonprofit Project #2
  • 300-hour Nonprofit Project

I really love the idea that you can work on some real-world non-profit projects after you complete their lessons. It’s great to get real experience and add a project to your portfolio. I don’t know any other free or paid coding school that gives you such a great opportunity.

Their HTML and CSS portion was fairly easy to go through and it was a great review since I had learned it earlier in the year. Their jQuery and JavaScript lessons use Codecademy, so you will still need to go between the two websites. I’m currently going through the Free Code Camp JavaScript so we’ll see how their subsequent lessons fair.

Free Code Camp is also on LinkedIn as an education institute and they encourage you to add them to your LinkedIn profile. Also check out Free Code Camp on Github. They are also on Facebook. I joined the Atlanta chapter.