Tuesday 3 May 2016

for & while loops - The Complete Node JS Developer Course

for and while loops


Lesson 19 started off with a simple demonstration. We followed along and created the simple countdown program below.



Once that was done, we had to go away and tackle a little project of our own. This time, we had to create a couple of countdown functions, that both do the same thing, but one uses a while loop, and the other uses a for loop. Here's mine below:


After that, I resumed the video and followed the tutor's worked example. See below:


I've got loads of notes on for and while loops from the codecademy course that I did a few months ago, so I'll write a full blog on that soon.

No comments:

Post a Comment