Received JavaScript for Kids book and drew some cats!

avatar
(Edited)

IMG_20190725_090650.jpg

Yesterday in the morning a copy of Nick Morgan's book "JavaScript for Kids" arrived and I was excited to begin studying from it. All day long I did some other things but just before going to bed I opened this book, read the introduction and solved my first excecise. I had to draw some cats.

Here is the solution:

var drawCats = function (howManyTimes) {
 for (var i = 0; i < howManyTimes; i++) {
 console.log(i + " =^.^=");
 }
};

drawCats(10);

And here's how it looked in JS Run program I downloaded for my Android phone (along with the output):

Screenshot_20190726_000303_com.mia.jsrun.jpg



0
0
0.000
3 comments
avatar

Interesting such cats :-)

0
0
0.000