Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

JavaScript: bind function

posted in JavaScript on 2014-03-09   function bind prototype comments fullname var scope user call arguments

The this keyword is always important in JavaScript. I'll admit that it took me some time to actually understand how it works. You know, sometimes JavaScript is all about the scope. Where you are and what you have an access to. This article is about the bind function. Something which I use very often.

read more

Dependency injection in JavaScript

posted in JavaScript on 2014-01-06   function var dependencies router service scope arguments deps dosomething

I like the quote that the programming is all about managing complexity. Maybe you've heard that the computer world is a giant construction of abstractions. We simply wrap things and produce new tools over and over again. Just think for a minute. The languages which you use have build-in functionalities and they are probably abstracted functions of other low level operations. It's the same with JavaScript.

read more

7 lines JavaScript library for calling asynchronous functions

posted in JavaScript on 2013-12-12   function var funcs callback scope queue function funcs var queue function array

I was surprised by the good feedback for JavaScript template engine in just 20 lines and decided to blog for another small utility function which I'm using often. While we are talking about JavaScript in the browser, most of the operations are asynchronous. We are dealing with callbacks all the time and sometimes we end up with awesome callback hell.

read more

Managing events in JavaScript

posted in JavaScript on 2013-08-23   model function var view controller eventbus callback function var scope event

I just noticed that the most popular repository in my GitHub account is EventBus. There is already an article about it, but it's a little bit outdated. I needed to clarify few things, so here is a new one.

read more

Managing events in JavaScript

posted in Must-see on 2013-08-23   model function var view controller eventbus callback function var scope event

I just noticed that the most popular repository in my GitHub account is EventBus. There is already an article about it, but it's a little bit outdated. I needed to clarify few things, so here is a new one.

read more

CSS: Understanding first-child, last-child and nth-child

posted in CSS3 on 2013-08-16   child element nth child scope row4 markup type color styles

I like the CSS only solutions. Very often I need to select a specific DOM element. Sure I could add a new class, but it is always nice if I can do that inside my stylesheets. It just looks better and keeps my HTML markup clean. first-child, last-child and nth-child are made exactly for this purpose.

read more

Douglas Crockford’s Function Challenges

posted in JavaScript on 2013-02-25   function s function challenges crockford s function douglas crockford s called multiple times function challenges test compose functions function scope learn knowledge

Douglas Crockford’s Function Challenges. Test your knowledge of function scope and and learn to compose functions that can be called multiple times through function returns.

read more

Delegation in JavaScript

posted in JavaScript on 2010-12-27   var numofargs arguments length var numofargs arguments args var numofargs var args var delegate scope method function delegate scope delegation

I think that the delegation is an important part of every programming language. It is also possible in JavaScript.

read more