Symbols

- [Instructor] The building blocks of all of our JavaScript…applications are JavaScript primitives.…Primitives in JavaScript are types, like numbers,…strings, arrays, and objects.…Symbols are a new primitive type in ES6.…Symbols are often used as unique identifiers…because they won't conflict with object keys…that are strings.…Symbols also help us to create customized iteration behavior…which we'll take a closer look at in the next video.…

For now, let's take a look at how we can create symbols…using the factory function.…So, here in our file, we're going to create…a new variable called id…and we're going to set this equal to a symbol.…So symbol is going to be a capital S…and we're going to create it by using this factory function.…Factory functions are simply functions that create things,…in this case, a symbol.…Let's then go ahead and create an object called courseInfo…and our courseInfo object is going to have a key…let's see, let me add my semicolon here,…and on line 10, and then on line nine here,…we'll give it a title which is ES6…

Resume Transcript Auto-Scroll

Author

Updated

10/6/2017

Released

1/5/2016

Meet the future of JavaScript: ECMAScript 6. This short course takes a look at the latest features of ECMAScript 6 (aka ES6) and how these changes are making JavaScript even more powerful and concise. Eve Porcello reviews the new keywords and function/object syntax and shows how the new class syntax can be used with React, the popular JavaScript library. You'll also review the ES6 compiling tool Babel, and use Babel to make your ES6 code compatible with modern browsers.

Topics include:

What is ECMAScript?

Transpiling ECMAScript with Babel and Babel-node

Using the let and const keywords

Creating strings with template strings

Enhancing object literals

Working with ES6 classes and class inheritance

Skill Level Beginner

2h 4m

Duration

521,705

Views

Show MoreShow Less

Q: The Babel API is out of date. How do I proceed with the course?

A: We are updating the course. In the meantime, you can install the babel-cli package and then install the presets that you need to follow along with the tutorials.