Monthly Archives: June 2012

MiniMorsel – Learn JavaScript With Me – NameAlizer

Learn JavaScript With Me – NameAlizer. Check out js.davecoast.com to see the exercises in action. Here’s all code - js.davecoast.com zipped JavaScript, HTML and CSS

This chapter 4 exercise (the last one) introduces concatenation. We accept a first name and a last name from the visitor and return a newly formatted string that contains the last name, a comma, a space and the first name.  It’s another simple program with an event listener and a function to handle some simple page element text. The most important learning tools for me is to type each item into the text editor (I’m using Notepad++). Just making a couple of typos by leaving out an apostrophe or messing up a bracket [ ] , brace { } or parenthesis ( ) really reinforces the syntax. After 100 scripts or so I’m sure I’ll be comfortabe to just copy in snippets. At this point of the learning process, I think the only way to get it down is to manually type each line myself (no shortcuts – yet…)

This is forcing me to complete each of the books exercises that are so easy to skip. Just getting through the 4 extremely easy Chapter Four exercises has been worth the price of the book. I’ve built some simple HTML and CSS to showcase the exercises. Lets get the Hello World Chapter 4 behind us – my summary is below. Next, Chapter 5 gets into Conditionals (If Statement syntax). Yep, I’m with you, it very tough trying to resist the urge to skip ahead. I have to know how to bake a cake before I can put the icing on it (or so I’ve heard)… Continue reading

MiniMorsel – Learn JavaScript With Me – TextSlicer – Simple String Methods

Learn JavaScript With Me – Text Slicer. Check out js.davecoast.com to see the exercises in action. Here’s all code – js.davecoast.com zipped JavaScript, HTML and CSS

This chapter 4 exercise introduces 2 string methods: .lastIndexOf and .slice. It’s another simple program with an event listener and a function to handle some simple page element text. The most important learning tools for me is to type each item into the text editor (I’m using Notepad++). Just making a couple of typos by leaving out an apostrophe or messing up a bracket [ ] , brace { } or parenthesis ( ) really reinforces the syntax. After 100 scripts or so I’m sure I’ll be comfortabe to just copy in snippets. At this point of the learning process, I think the only way to get it down is to manually type each line myself (no shortcuts – yet…)

This is forcing me to complete each of the books exercises that are so easy to skip. Just getting through the 4 extremely easy Chapter Four exercises has been worth the price of the book. I’ve built some simple HTML and CSS to showcase the exercises. Lets get the Hello World Chapter 4 behind us – my summary is below. Next, Chapter 5 gets into Conditionals (If Statement syntax). Yep, I’m with you, it very tough trying to resist the urge to skip ahead. I have to know how to bake a cake before I can put the icing on it (or so I’ve heard)… Continue reading