JavaScript Articles
-
ES6 In Depth: Arrow functions
ES6 In Depth is a series on new features being added to the JavaScript programming language in the 6th Edition of the ECMAScript standard, ES6 for short. Arrows have been part of JavaScript from the very beginning. The first JavaScript tutorials advised wrapping inline scripts in HTML comments. This would prevent browsers that didn’t support […]
-
Power Surge – optimize the JavaScript in this HTML5 game using Firefox Developer Edition
The Firefox Developer Tools team wanted to find a fun way to show off the great performance tools we’ve just added to the Firefox Developer Edition browser. We partnered with Przemysław Sikorski (aka rezoner) author of Playground.js and the arcade puzzle game QbQbQb, to create “Power Surge,” a fun game which shows off how the […]
-
ES6 In Depth: Destructuring
ES6 In Depth is a series on new features being added to the JavaScript programming language in the 6th Edition of the ECMAScript standard, ES6 for short. Editor’s note: An earlier version of today’s post, by Firefox Developer Tools engineer Nick Fitzgerald, originally appeared on Nick’s blog as Destructuring Assignment in ES6. What is destructuring […]
-
ES6 In Depth: Rest parameters and defaults
ES6 In Depth is a series on new features being added to the JavaScript programming language in the 6th Edition of the ECMAScript standard, ES6 for short. Today’s post is about two features that make JavaScript’s function syntax more expressive: rest parameters and parameter defaults. Rest parameters A common need when creating an API is […]
-
ES6 In Depth: Template strings
ES6 In Depth is a series on new features being added to the JavaScript programming language in the 6th Edition of the ECMAScript standard, ES6 for short. Last week I promised a change of pace. After iterators and generators, we would tackle something easy, I said. Something that won’t melt your brain, I said. We’ll […]
-
ES6 In Depth: Generators
ES6 In Depth is a series on new features being added to the JavaScript programming language in the 6th Edition of the ECMAScript standard, ES6 for short. I’m excited about today’s post. Today, we’re going to discuss the most magical feature in ES6. What do I mean by “magical”? For starters, this feature is so […]
-
ES6 In Depth: Iterators and the for-of loop
ES6 In Depth is a series on new features being added to the JavaScript programming language in the 6th Edition of the ECMAScript standard, ES6 for short. How do you loop over the elements of an array? When JavaScript was introduced, twenty years ago, you would do it like this: <pre> for (var index = […]
-
Firefox OS, Animations & the Dark Cubic-Bezier of the Soul
I’ve been using Firefox OS daily for a couple of years now (wow, time flies!). While performance has steadily improved with efforts like Project Silk, I’ve often noticed delays in the user interface. I assumed the delays were because the hardware was well below the “flagship” hardware I’ve become accustomed to with Android and iOS devices. Last […]
-
ES6 In Depth: An Introduction
Welcome to ES6 In Depth! In this new weekly series, we’ll be exploring ECMAScript 6, the upcoming new edition of the JavaScript language. ES6 contains many new language features that will make JS more powerful and expressive, and we’ll visit them one by one in weeks to come. But before we start in on the […]
-
Network Activity and Battery Drain in Mobile Web Apps
Editor’s note: This post describes the work of a group of students from Portland State University who worked with Mozilla on their senior project. Over the course of the last 6 months, they’ve worked with Mozillian Dietrich Ayala to create a JavaScript library that allows developers to optimize the usage of network operations, thus saving […]