Wednesday, February 26, 2014

I Finished the course!/.js is still a-happening.

     I already know that this is late because I'm writing the intro last. What, I can do that. It's called mixing things up. I do that sometimes. The good news is that I finished the HTML/CSS lesson! Olé! The boring news is that I still have a ways to go with the .js. Not really sure that's boring since that just means I'll be learning a lot more new things. Learning new things is always fun. So, I take the back the boring other news is that .js is still going on.  Ye olde(See, I did it again!) grooveShark is still blazing away. No coffee today. Just pure gumption over here! Time to plug in and plug away!

HTML/CSS


     Working away ye olde(I say ye olde too much) HTML/CSS again. Remember that website about an angry puppy from a while back? right around when I started CSS. They had me build it now. Which was weird, because; I knew what they were talking about! Whaaaaat?? That is just weird. The play on words was delightful. I'm working on positioning(still) and I am using it to make a "resumé" and they said how to "position" yourself. I laughed. Good grammar and a funny play on words is always delightful. Today was review. Lots of review.
     And now I know why! I'm done the lesson! Good thing I've got plenty of classes elsewhere that use HTML.


JavaScript


     First up are the notations. I've already gone over them, but today's theme seems to be review.
First there is Literal notation. "Literal notation creates a single object. It uses curly brackets { } and the object's default properties are defined within the brackets using <property:value> notation.
I find this to be the quickest when it applied to a small number of elements.

     Second is the Construction notation. "Constructor notation involves defining an object constructor. And like defining a function, we use the function keyword. You can think of this constructor as a "template" from which you can create multiple objects. To create a new object from a constructor, we use the new keyword."
I use this one when you have multiple elements with same properties.  For example:
//this one is the Construction notation.
var james = {
    job : "programmer",
    married : false
 
};
//This one is the Literal notation.
function Person(job, married) {
    this.job = job;
    this.married = married;
}

var gabby = new Person("student",true);

     See how many lines of code are needed in a Construction notation for one Object?
The Literal notation has more lines of code up front, but then you're able to add more in one line later on. The Construction notation has its uses, but, usually, in a more singular case. I say usually, because; everyone has their own way of doing things, and I'm sure that for some people, the Construction notation is their go-to trigger. My go-to trigger is my laptop. I found my old laptop, which means that I might be talking about a game soon. It's running ElementaryOS. I think I'll try and get Sublime Text or something along those lines and take a crack at it. That's all for today, folks! See y'all Friday!

--Martin

No comments:

Post a Comment