Archive for the ‘objects’ Category

Quick Tip: How to Sort an Array of Objects in JavaScript

Posted on: No Comments
If you have an array of objects that you need to sort into a certain order, the temptation might be to reach for a JavaScript library. Before you do however, rember that you can do some pretty neat sorting with the native Array.sort function. In this...

Quick Tip: What Are Factory Functions in JavaScript

Posted on: No Comments
You can't get far as a JavaScript programmer without learning about functions and objects, and when used together, they are the building blocks we need to get started with a powerful object paradigm called composition. Today we'll look at some idiomati...

JavaScript Object Creation: Patterns and Best Practices

This article was peer reviewed by Tim Severien. Thanks to all of SitePoint's peer reviewers for making SitePoint content the best it can be! [author_more] JavaScript has a multitude of styles for creating objects, and newcomers and veterans alike can f...

Preparing for ECMAScript 6: Proxies

Posted on: No Comments
In computing terms, a proxy sits between you and the thing you are communicating with. The term is most often applied to a proxy server -- a device between the web browser (Chrome, Firefox, Safari, Edge etc.) and the web server (Apache, NGINX, IIS etc....