Top 10 Javascript Interview Questions

Javascript Top 10 Interview Questions

This is my very first post on anything interview related. I figure it would be helpful to cover common Javascript questions during an interview. As mentioned in a previous posts, Javascript is totally different beast. From my experience, my interviews have been pretty tame. They were mainly OOP related questions but this was before ES6, before Javascript classes and constructors were introduced. I remember having to write literal objects on a white board and explaining this object’s properties and methods.

Continue reading “Top 10 Javascript Interview Questions”

Using the Promise Object with Javascript

Using the Promise Object in Javascript

I haven’t had to use the Promise function constructor much, I think maybe I’ve used it a handful of times. I don’t know if this is a bad thing. To be honest, the concept of promises is still a bit fuzzy to me. I’d like to build more applications utilizing this construct but I haven’t had to write any programs that run too many asynchronous operations. Or, the need for it wasn’t necessary and I got away with writing a bunch of function callbacks. But that’s what Promises were made for – to eliminate what developers describe as “callback hell” – basically what you get is a chain of nested callbacks which makes for “unnecessary inefficient bloat”. Yeah that’s exactly what I called it.

Continue reading “Using the Promise Object with Javascript”

Using var in Javascript

Using var in javascript

So a little bit of history 101 when it comes to the ‘var’ keyword in Javascript. Back when Javascript was super weird, I mean Javascript is still weird don’t get me wrong. For this reason I started liking Javascript – I used to think it was just to messy of a language to write in. I had some major trust issues with it, my relationship with PHP was far better. Alright enough with relationships, let’s dive right in.

Continue reading “Using var in Javascript”

Javascript Closures

Javascript Closures

Yeah. Closures. I know I’m kind of late in getting to this. Closures have been widely discussed subject among developers and I feel like I should get a good handle on it myself. First things first though, it’s important to understand that closures in javascript are a feature not a built in construct. If you’ve been writing in Javascript you’ve already encountered closures you just weren’t aware of it. I think the concept of closures tends to intimidate or confuse a lot of beginners and even self proclaimed experts in javascript.

Continue reading “Javascript Closures”

Javascript Creation Patterns

Javascript Object Creation Patterns

I’ve taken a long break due to consulting work and a few lazy summer days. I’ve also taken a long break from writing any PHP but I’m itching to getting back to writing more PHP related articles. I just haven’t seen anything new with PHP lately except for some frameworks I haven’t dabbled with yet like Laravel, CodeIgniter and others. Perhaps I’ll find interest in these at a later time – it might worth dissecting these architectures, there’s always something new to learn.

Continue reading “Javascript Creation Patterns”