I received an Amazon box with a javascript book I had ordered a while back. So now I've got an additional study aid, and I'm stoked and ready to hit the books again! I've solved Euler Problem One, and now I've got to solve Euler Problem 2 and 3 in order to move forward, but I want to familiarize myself with Javascript some more, so I'm going through the book I ordered, "A Smarter Way to Learn Javascript," by Mark Myers. The book has a companion website with lots of coding examples/problems that really hammer in every aspect of javascript that the author is focusing on conveying. So far so good.
Any numbers or variable representing numbers, that are placed in an alert, will be converted into strings as the output of the alert. Although javascript allows us to capitalize the first letter of a variable, the current standard is the use of camelCase, which means, we should not capitalize the first letter of the first word. We can have numbers in the variable name, but the variable may not begin with a number. The variable may, however, begin with an underscore or a dollar sign, the two allowed non-letter, non-number characters.
There's 89 chapters in the book, I'm on chapter 5 right now, "Math Expressions: Familiar Operators." I loked up the difference between modulo and modulus, and it was explained like so, "the modulus is the number that results when you run a modulo operation, for example 10 % 3 would yield a modulus of 1." There were different opinions on the usage, though.
num++ = num + 1;
num-- = num - 1;
This:
var y = 1;
var x = y++;
Results in y being 2, and x being 1.
This:
var y = 1;
var x = ++y;
Results in y being 2 and x being 2 as well. Basically, if the ++ is before the variable, you increment the variable before assigning the new value to another variable, while if the ++ is after the variable, you assign the value of the variable to the other variable first, then you add 1 to the variable with the ++ after it. In other words, if the ++ is before, you do the ++ operation and then assign the value, while if the ++ is after, you do the assignment of the variable first, and then add 1 to the variable before the ++. It can be a bit confusing to explain, but it's easy to remember by associating the placement of the ++ (before/after) with whether the ++ is run before or after. Interestingly,
This:
var x = 3;
x = x++;
alert(x);
Yields a 3. While this:
var x = 3;
x++;
alert(x);
Yields a 4.
Any numbers or variable representing numbers, that are placed in an alert, will be converted into strings as the output of the alert. Although javascript allows us to capitalize the first letter of a variable, the current standard is the use of camelCase, which means, we should not capitalize the first letter of the first word. We can have numbers in the variable name, but the variable may not begin with a number. The variable may, however, begin with an underscore or a dollar sign, the two allowed non-letter, non-number characters.
There's 89 chapters in the book, I'm on chapter 5 right now, "Math Expressions: Familiar Operators." I loked up the difference between modulo and modulus, and it was explained like so, "the modulus is the number that results when you run a modulo operation, for example 10 % 3 would yield a modulus of 1." There were different opinions on the usage, though.
num++ = num + 1;
num-- = num - 1;
This:
var y = 1;
var x = y++;
Results in y being 2, and x being 1.
This:
var y = 1;
var x = ++y;
Results in y being 2 and x being 2 as well. Basically, if the ++ is before the variable, you increment the variable before assigning the new value to another variable, while if the ++ is after the variable, you assign the value of the variable to the other variable first, then you add 1 to the variable with the ++ after it. In other words, if the ++ is before, you do the ++ operation and then assign the value, while if the ++ is after, you do the assignment of the variable first, and then add 1 to the variable before the ++. It can be a bit confusing to explain, but it's easy to remember by associating the placement of the ++ (before/after) with whether the ++ is run before or after. Interestingly,
This:
var x = 3;
x = x++;
alert(x);
Yields a 3. While this:
var x = 3;
x++;
alert(x);
Yields a 4.
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)
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
In Progress: "Eloquent JavaScript," by Marijn Haverbeke (On pg 27)
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 33)
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: 4
Total Hours Coding: 389
No comments:
Post a Comment