nickdances / js_forKids

Inspired by the exercises and material in Nick Morgan's JavaScript for Kids

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inspired by JavaScript for Kids by Nick Morgan

compliments.js

Chapter 3 of JavaScript for Kids culminates in several exercises built around an insult generator created throughout the chapter. Not to be a wet blanket, but that is not the sort of thing I want to create, so I made a compliment generator instead. Rather than the recommended .join() method or concatenation via the + operator, I put compliments together using string interpolation. Simply run the function complimentGenerator() to see it in action, or open welcome.html in your favorite (modern) browser.

welcome.html

Chapters 9 and 10 of JavaScript for Kids introduce jQuery and interactive programming concepts, while chapter 13 introduces the canvas element. welcome.html uses a simple canvas element to draw a stick man, and uses jQuery to create a button that will call compliments.js. Note that compliments.js is included from this github repo, via the project by the good folks at https://rawgit.com/.

Future opportunities

JavaScript for Kids also dives into more advanced concepts around animation of DOM elements and user interaction with canvas elements. A waving stick man, allowing users to draw their own stick man, a walking stick man - these are all, in my mind, obvious next steps for the project.

About

Inspired by the exercises and material in Nick Morgan's JavaScript for Kids


Languages

Language:JavaScript 56.6%Language:HTML 43.4%