Mark started in the developer world over 25 years ago. He began his career with a Bachelor of Science in Computer Science from St. Johns University. After spending 10 years on Wall Street working for Goldman Sachs, Lehman Brothers and other major investment banks, Mark became interested in animation and video game software.
New Types and Object Extensions In this module we'll look at New Types and Object Extensions in ES6. The main new type is the symbol type, and just about every major object in ES5 has been extended some way. First of we'll look at symbols. Symbols is a brand new concept in ES6, and a symbol is used mainly to provide some kind of unique string, and it's guaranteed to be unique and in fact as a developer you'll never even know what that unique ID is. The main way that symbols are used in ES6 as of right now are to add properties to classes. For instance what if you wanted to add a property to every class in your system? Maybe it had to do with security or maybe it had to do with logging or possibly debugging. How can you guarantee that whatever property you add to all these classes will be unique? Well, that's what we use symbols for. You can also use a symbol to provide some kind of unique string as an ID, but we'll see how to work with this new type. There are also well-known symbols. These are symbols that are used as properties on objects that are standardized. For instance when we work with iterators later in this course we'll see how to access an iterator of an object by using it's well known symbol. Now Object with a capital O has been extended, and we'll take a look at all of the new functions added onto that, and there are String Extensions for the string class, there are Number Extensions which clean up some of the problems we've had in ES5 working with numbers. There are Math Extensions adding lots of new mathematical functions, and Regular Expressions have been extended, and a big part of that is now working with unicode in a better way. And finally we'll look at Function Extensions. Mainly there's a name property that's been standardized and we can work with that now, so let's get started with this module and take a look at symbols.