After going through the forums on Treehouse I learned that the Javascript Basics course is actually a new attempt by Treehouse to teach javascript. This new course was created after it was decided that the old course, Javascript Foundations, could be improved upon. So, now that I know that, and after reading the reviews for the new course versus the reviews for the old course, I'll be starting off with the Javascript Basics course, while complementing it with the Codecademy javascript course.
Syntax: a programming language's vocabulary and grammar (so, a syntax error is a mistake like mistyping a javascript command or forgetting closing parentheses or quote marks).
Statement: a line of programming code (a program is made up of statements).
Program: a set of statements that run one after the other.
document.write("<h1> Welcome to Javascript Basics</h1>");
The document.write is a command that tells javascript to write code to the current document, in this case, it will execute the html code after the alert. Although our javascript can be inserted directly into an html document (like this: <script>alert("Here's another message from Treehouse")</script>), it is preferable to create a file specifically to hold the javascript (and only the javascript) code. This file can have any name, but it should end with .js. Here is the code we entered in the head of the html document in order to link the javascript code to the html document (it is now preferred to enter it just before the closing body tag):
<script src="scripts.js"></script>
In the case above, the javascript file is called scripts.js. Do not insert javascript code inside of a javascript link tag, either create a link to the javascript or insert the javascript directly into the html, but do not insert the javascript code into the javascript link. It's perfectly ok to have several links to different javascript files and also to have javascript code within several javascript tags.
With syntax errors, the console will only show us the first error. Once we fix that error, the console will show us the error after that, and so on and so forth. Here's some of the code we wrote today.
console.log("Begin program");
alert("Help me fix this program!");
alert("Can you get this message to appear?");
document.write("<h2>My first JavaScript program</h2>");
document.write("<p>I'm practicing 'debugging'.</p>");
console.log("End program");
I'm actually enjoying today's coding quite a bit...time is passing by very quickly. I've been getting in the zone lately, and I like it.
Syntax: a programming language's vocabulary and grammar (so, a syntax error is a mistake like mistyping a javascript command or forgetting closing parentheses or quote marks).
Statement: a line of programming code (a program is made up of statements).
Program: a set of statements that run one after the other.
document.write("<h1> Welcome to Javascript Basics</h1>");
The document.write is a command that tells javascript to write code to the current document, in this case, it will execute the html code after the alert. Although our javascript can be inserted directly into an html document (like this: <script>alert("Here's another message from Treehouse")</script>), it is preferable to create a file specifically to hold the javascript (and only the javascript) code. This file can have any name, but it should end with .js. Here is the code we entered in the head of the html document in order to link the javascript code to the html document (it is now preferred to enter it just before the closing body tag):
<script src="scripts.js"></script>
In the case above, the javascript file is called scripts.js. Do not insert javascript code inside of a javascript link tag, either create a link to the javascript or insert the javascript directly into the html, but do not insert the javascript code into the javascript link. It's perfectly ok to have several links to different javascript files and also to have javascript code within several javascript tags.
With syntax errors, the console will only show us the first error. Once we fix that error, the console will show us the error after that, and so on and so forth. Here's some of the code we wrote today.
console.log("Begin program");
alert("Help me fix this program!");
alert("Can you get this message to appear?");
document.write("<h2>My first JavaScript program</h2>");
document.write("<p>I'm practicing 'debugging'.</p>");
console.log("End program");
I'm actually enjoying today's coding quite a bit...time is passing by very quickly. I've been getting in the zone lately, and I like it.
SUMMARY OF CODING SKILLS
Total Treehouse Points: 4,552
Treehouse Points by Subject Matter (Miscellaneous not included):
HTML: 663
CSS: 1,599
Design: 1,193
Development Tools: 747
Javascript: 317
Treehouse Ranking (%): "You have more total points than 89% of all students."
Treehouse Badge(s) Earned Today:
Introducing Javascript
Treehouse Courses Completed:
How to Make a Website
HTML
CSS Foundations
CSS Layout Techniques
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
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
Codecademy (& other) Courses Completed:
HTML and CSS (Codecademy)
Books Read or in Progress:
Completed: "Head First HTML and CSS," by E. Robson & E. Freeman (37 pg preface and 710 pgs of actual content (as in, I'm not including the book's index))
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.5
Total Hours Coding: 335
No comments:
Post a Comment