Practical Javascript Day 2

March 02, 2019

Spent a couple of hours today reviewing basic JS concepts via Gordon Zhu's Practical Javascript Course.

The most valuable lesson of the day actually had little to do with JavaScript or coding itself.

It was actually the concept of:

Ability = Process * Time

There's no benefit to focusing on things you can't control. Such as other peoples' skill level or the number of years of experience you lack.

So focus on what you can control: Your Process.

Focusing on a good process also makes you much faster and efficient with your time. Surprisingly, the most important part of your process (according to Gordon) is how you ask questions. Reading through this article he wrote will clarify.

As for my JavaScript notes:

On scope

If you're inside of a function, you can look outside and access data, but the opposite isn't true. If you're outside, you can't look in.

On objects

In general, you use objects in JS to group together related data and functions.

  • Each piece of data in an object is called a property
  • Each function in an object is called a method

this when used in a method, will refer to the object itself (more on that in later modules).

Console tip: You can comment out multiple highlighted lines with ⌘ (Command) + /

The ! operator returns the opposite of whatever comes after it.

For example:

!true == false , !false == true 
← back to all posts