background preloader

Airbnb/javascript Airbnb JavaScript Style Guide() { A mostly reasonable approach to JavaScript Table of Contents Types Primitives: When you access a primitive type you work directly on its value stringnumberbooleannullundefinedvar foo = 1, bar = foo; bar = 9; console.log(foo, bar); // => 1, 9Complex: When you access a complex type you work on a reference to its value objectarrayfunctionvar foo = [1, 2], bar = foo; bar[0] = 9; console.log(foo[0], bar[0]); // => 9, 9

Related:  JavaScript documentation sitesJavascript style and stuctureTeach about Programming

Read JavaScript Allongé A Pull of the Lever: Prefaces “Café Allongé, also called Espresso Lungo, is a drink midway between an Espresso and Americano in strength. There are two different ways to make it. The first, and the one I prefer, is to add a small amount of hot water to a double or quadruple Espresso Ristretto. Like adding a splash of water to whiskey, the small dilution releases more of the complex flavours in the mouth. “The second way is to pull an extra long double shot of Espresso.

6. Objects and classes by example - Mixu's Node book In this chapter, I: cover OOP in Javascript by example point out a few caveats and recommended solutions I'm not covering the theory behind this, but I recommend that you start by learning more about the prototype chain, because understanding the prototype chain is essential to working effectively with JS. The concise explanation is: Javascript is an object-oriented programming language that supports delegating inheritance based on prototypes.

Prototypes and Inheritance in JavaScript Forget everything you know about object-oriented programming. Instead, I want you to think about race cars. Yes – race cars. Paper.js - Paper.js Standing on the shoulders of Scriptographer and making use of HTML5 standards, Paper.js is a comprehensive open source vector graphics scripting framework. Document Object Model Paper.js provides a Document Object Model (also called a Scene Graph) that is very easy to work with. Create a project and populate it with layers, groups, paths, rasters etc. Groups and layers can contain other items and even other groups.

untitled Jump to progress the Jarallax.jumpToProgress method allows the user to animate the Jarallax animation to a position in the animation. This is a very handy method for navigation. To see it in action press one of the navigation buttons on top of the page. Example jarallax.jumpToProgress( 20, 2000, 30); Understanding RequireJS for Effective JavaScript Module Loading Modular programming is used to break large applications into smaller blocks of manageable code. Module based coding eases the effort for maintenance and increases reusability. However, managing dependencies between modules is a major concern developers face throughout the application development process. RequireJS is one of the most popular frameworks around for managing dependencies between modules.

Simple Inheritance with JavaScript This article is part of a web dev tech series from Microsoft. Thank you for supporting the partners who make SitePoint possible. A lot of my friends are C# or C++ developers. They are used to using inheritance in their projects and when they want to learn or discover JavaScript, one of the first question they ask is: “But how can I do inheritance with JavaScript?” Actually, JavaScript uses a different approach than C# or C++ to create an object-oriented language. Preparing Yourself for Modern JavaScript Development There is a lot going on in the JavaScript world these days, both in and out of the browser. Talk about script loaders, client side MVC frameworks, minifiers, AMD, Common.js, Coffeescript, can quickly get your head spinning. And for those people who are completely immersed in that world, it can be easy to forget that the vast majority of JavaScript developers today haven’t heard of any of these tools, and in fact, they likely aren’t even equipped to try these tools. This post is going to be an attempt to simply address some of the low hanging fruit out there, and try to bring together a few different concepts that a developer should understand before they go out and try to tackle something like Backbone.js or Ember.js.

Learning JavaScript Design Patterns Design patterns are reusable solutions to commonly occurring problems in software design. They are both exciting and a fascinating topic to explore in any programming language. One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we're attempting to solve. Slicebox - 3D Image Slider Creative Lifesaver Honest Entertainer Brave Astronaut Affectionate Decision Maker Faithful Investor Groundbreaking Artist Selfless Philantropist Example 4: Same like example example 3, with a higher disperse factor