JavaScript Functions Are Objects

(video re-posted)


Video transcript:

What’s up it’s Danielle, I’m hanging out in the library. I like to get a good book from time to time but today’s topic, vlog, blog, is Functions Are Objects. Functions are objects? I just found this out so I’m like wait a minute, I feel like JavaScript lied to me lol because all this time… But I should be more specific. In JavaScript, Functions are First-Class Objects. So I’m gonna have a good time, I’m gonna play around with this. And this should be the key with Functional Programming. You know, passing around functions to functions and really kind of playing with it, sort of like a set of Legos. And this should be key to unlocking JavaScript’s potential.


So right now I’m working with IIFE’s (Immediately-Invoked Function Expressions), the ‘this’ keyword, Closures, Hoisting, call(), apply(), bind(), of course Object-Oriented Programming, the ‘new’ keyword and Prototypal Inheritance. And I’m also gaining an understanding of Function Constructors. And while I’m doing that, I’m really kind of studying all these things in the Underscore.js library. It’s actually pretty good for studying Functional Programming. They comment everything, and everything’s really well explained. So if you haven’t seen it check it out. And that’s today’s video, that’s it for today. Again Subscribe, Like, you get plenty of tech, vlogs, self-development, reviewing and reading books. Check it out, stay tune, talk to you later.

P.S. It’s interesting the clever ways a lot of these concepts are used in the Underscore.js library.


Love & Peace,


Button with up and down arrows

Up, Down, In-Between?

Many people get the DOM (Document Object Model) Events keypress, keydown and keyup confused, I was one of them.

At a surface level it may appear they do basically the same thing, but let’s look a little closer…

Keypress events can seem the same as keydown, but keydown is triggered as soon as a user presses a key on a keyboard. A keypress event is triggered for each character that’s typed.

For example, modifier keys like Shift, that don’t actually type a character when pressed, trigger keydown events. But because it never types a character, it never triggers a keypress event.

The keyup event is caused when the user releases a key. The element that has the focus, or often the cursor, is where the event is sent.

Love & Peace,