Thursday, September 10, 2015

Day 138: Ch. 85 "A Smarter Way to Learn JavaScript"

O.k., I finished chapter 84, it was very similar to 82 and 83, except it dealt with validation radio buttons.

Now I'm on Chapter 85 Form Validation: Zip Codes.  In this chapter, we learned how to make sure a user enters a 5 digit number for a zip code, as opposed to letters or a number less than or greater than 5 digits.

We used this code:

if (isNaN(variableX)) {

to test if variableX was a number (as opposed to a letter). 

O.k., I'm done with chapter 85, now I'm on Chapter 86 Form Validation: Email.   This chapter dealt with .indexOf, using it to verify whether required inputs were in email addresses, like "." and "@" for example.  It used !== -1, which when coupled with the index of, will tell you if something is missing.  Here's an example:

if (jack.indexOf(" ") !== -1) {
  alert("hey, don't put spaces in your password");
}

This is because when something is not found using indexOf, JavaScript outputs a -1, so if the output is a -1, that means that there is no spaces, and if the output is NOT a -1, that means it's a 1, 2, 3, 4, or more, for example, which means the item is in the index, which is not what's desired in the case above.

It gets a bit convoluted with using not, !==, and -1.

O.k., I'm done with chapter 86, and I'll start on Chapter 87 Exceptions: Try and Catch tomorrow. 

SUMMARY OF CODING SKILLS

Total Treehouse Points: 5,385

Treehouse Points by Subject Matter (Miscellaneous not included): 
HTML:                                663 
CSS:                                1,599 
Design:                            1,193 
Development Tools:            747 
JavaScript:                      1,120

Treehouse Ranking (%): "You have more total points than 94% of all students."

Treehouse Badge(s) Earned Today:



Treehouse Courses Completed:
How to Make a Website
HTML
CSS Foundations
CSS Layout Techniques
Aesthetic Foundations
Design Foundations
Adobe Photoshop Foundations
Adobe Illustrator Foundations (66% complete, switched focus from web design to web dev)
Git Basics
Introduction to Programming
JavaScript Basics

Codecademy (& other) Courses Completed:
HTML and CSS (Codecademy) 

Books Read or in Progress:

Completed: "Head First HTML and CSS," by E. Robson & E. Freeman (768 pgs.)
In Progress: "Head First JavaScript," by Eric Freeman and Elisabeth Robson (on pg. 56)
In Progress: "A Smarter Way to Learn JavaScript," by Mark Myers (on pg 284)

My Progress on The Odin Project:
1.  Introduction to Web Development             100% Complete
2.  Web Development 101                                29% Complete
3.  Ruby Programming                                       0% Complete
4.  Ruby on Rails                                               0% Complete
5.  HTML5 and CSS3                                           0% Complete
6.  JavaScript and JQuery                                  0% Complete
7.  Getting Hired as a Web Developer                 0% Complete

Hours Spent Coding Today: 2
Total Hours Coding: 613

No comments:

Post a Comment