A letter from myself 2 years, 8 months and 24 days ago, on June 02, 2011

Dear FutureMe,

1001 days ago you started a project to complete 101 things in 1001 days. I hope you’ve done all, if not most, of the things on your list.

It’s 2011, your boyfriend just broke up with you and you’re going to be starting a new job soon. I hope you’re well over him and have found someone else and that he’s wonderful. Make sure he treats you well! You deserve it! I hope your job is amazing as you thought it would be and maybe you’ve moved up by now! In 2010, your best friend, Melanie, got married. I hope by then they have had a kid and you’re spoiling them rotten.

I hope in 2014 you’re out there living an amazing life. Remember to never forget who you are and don’t let what other people think bother you too much. Live and love with all your heart, my dear. Take good care of your family and tell them you love them more often!

Love you!

How to Learn JavaScript Properly - Start of Week 4

What I’m working on this week

Halfway there!

I’m going to be reading 36 pages of Professional JavaScript for Web Developers everyday Wednesday through Sunday. It’s going to be tough to keep it up through the weekend but I CAN DO IT.

Bring it on, Javascript.

How to Learn JavaScript Properly - Week 3

What I finished this week

What I learned

I learned that trying to study and do the CSSOFF during the week of BGGCon and the week before Thanksgiving is a terrible, terrible idea. I will be extending week 3 and I’ll start week 4 after the holiday!

Want to join me?

Check out How to Learn JavaScript Properly from JavaScript is Sexy and the study group on Reddit.

How to Learn JavaScript Properly - Start of Week 3

What I’m working on this week

I got a little behind on my work last week but I was still able to finish all the required work for the week. This week should be a bit easier for me because there’s a lot less reading to worry about and more projects! Woo!

This isn’t part of my JavaScript studies but, I plan on participating in the CSSOFF. I have a few days off this week so I want to take that extra time to submit an entry to the CSSOFF no matter what!

How to Learn JavaScript Properly - Week 2

What I finished this week

What I learned

Hoisting

Function and variable declarations are hoisted to the top of their scope. Keep in mind that only the declarations are hoisted so if you initialized it with a value, it will be undefined at the top. Here’s an example:

The original code

var name = "Jackie";

function sayHello () {
 alert("Hello! I'm " + name); //output is "Hello! I'm undefined"
 var name = "Jackie's evil clone";
}

What’s actually happening

var name = "Jackie";

function sayHello () {
 var name;
 alert("Hello! I'm " + name);
 var name = "Jackie's evil clone";
}

Here are more resources on hoisting:

Call and Apply

You can use the call() and apply() methods to call a function with a specific this value. The main difference between the two is that you use call() when you know specifically what the arguments are and you use apply() when you have an array of arguments.

var args = ["Hello","Jackie"];
person.greet.apply(person, args);

Here are more resources on call and apply:

Eval

I think eval() is pretty damn cool. It accepts one argument - a string of JavaScript - and it executes it! In the following example, I have a prompt that asks the user to enter some JavaScript and then on the next line it executes what they entered.

var evalPrompt = prompt("Enter some JavaScript!");
eval(evalPrompt);

Want to join me?

Check out How to Learn JavaScript Properly from JavaScript is Sexy and the study group on Reddit.