ES6 Reflection in Depth

added by bpwndaddy
9/17/2015 3:45:26 PM

417 Views

Oh hey – I was just casually getting ready, didn’t see you there! Welcome to another edition of ES6 – “Oh. Good. We survived traps” – in Depth. Never heard of it? Refer to A Brief History of ES6 Tooling. Then, make your way through destructuring, template literals, arrow functions, the spread operator and rest parameters, improvements coming to object literals, the new classes sugar on top of prototypes, let, const, and the “Temporal Dead Zone”, iterators, generators, Symbols, Maps, WeakMaps, Sets, and WeakSets, proxies, proxy traps, and more proxy traps. We’ll be touching on the Reflect API today. Like I did in previous articles on the series, I would love to point out that you should probably set up Babel and follow along the examples with either a REPL or the babel-node CLI and a file. That’ll make it so much easier for you to internalize the concepts discussed in the series. If you aren’t the “install things on my computer” kind of human, you might prefer to hop on CodePen and then click on the gear icon for JavaScript – they have a Babel preprocessor which makes trying out ES6 a breeze. Another alternative that’s also quite useful is to use Babel’s online REPL – it’ll show you compiled ES5 code to the right of your ES6 code for quick comparison. Before getting into it, let me shamelessly ask for your support if you’re enjoying my ES6 in Depth series. Your contributions will go towards helping me keep up with the schedule, server bills, keeping me fed, and maintaining Pony Foo as a veritable source of JavaScript goodies. Thanks for reading that, and let’s go into Reflect. I suggest you read the articles on proxies: Proxy built-in, traps, and more traps. These will help you wrap your head around some of the content we’ll go over today.


0 comments