tonic's notebooks

  • ES6 Maps, WeakMaps, Sets, and WeakSets - /tonic/es6-maps-weakmaps-sets-and-weaksets
    Last edited 7 years ago
    Maps and Sets are new Collections in JavaScript that extend its capabilities beyond just Objects and Arrays. Maps are kind of like objects, but allow you to use *any* object as a key, not just strings:
  • ES6 Enhanced Object Literals - /tonic/es6-enhanced-object-literals
    Last edited 7 years ago
    In ES6 object literals have a number of shorthands. You can computer property names right in the declaration, define methods with a shorter syntax, and have more convinient declarations when the key matches the value:
  • ES6 Destructuring - /tonic/es6-destructuring
    Last edited 7 years ago
    Destructuring allows binding using pattern matching, with support for matching both arrays and objects.
  • ES6 Arrow Functions - /tonic/es6-arrow-functions
    Last edited 7 years ago
    Arrow functions (also known as fat arrow functions) have a shorter syntax compared to traditional function expressions and lexically bind the this value. Arrow functions are also always anonymous. Here we are using the shortest form, where the body is a simple expression and we can drop the parenthesis around the parameter since there is only one:
  • ES6 and ES7 Support - /tonic/es6-and-es7-support
    Last edited 7 years ago
    ECMAScript 6 (also known as ES2015) Support: Arrow Functions: https://tonicdev.com/tonic/es6-arrow-functions Destructuring: https://tonicdev.com/tonic/es6-destructuring Enhanced object literals: https://tonicdev.com/tonic/es6-enhanced-object-literals Default, Rest, and Spread: https://tonicdev.com/tonic/es6-default-rest-and-spread Map, Set, WeakMap, WeakSet: https://tonicdev.com/tonic/es6-maps-weakmaps-sets-and-weaksets Promises: (description coming soon) Binary and octal literals: https://tonicdev.com/tonic/es6-binary-and-octal-literals Symbols: https://tonicdev.com/tonic/es6-symbols Generators and Iterators: https://tonicdev.com/tonic/es6-iterators-and-generators Template Strings: https://tonicdev.com/tonic/es6-template-strings ECMAScript 7 Support: Asynchronous Functions: https://tonicdev.com/tonic/es7-async-functions Extra Support: JSX and React: https://tonicdev.com/tonic/jsx-in-tonic
  • ES6 Iterators and Generators - /tonic/es6-iterators-and-generators
    Last edited 7 years ago
    ES6 introduced the new for...of construct to iterate over collections:
  • ES6 Iterators and Generators - /tonic/est6-iterators-and-generators
    Last edited 7 years ago
    ES6 introduced the new for...of construct to iterate over collections:
  • ES6 Symbols - /tonic/es6-symbols
    Last edited 7 years ago
    Symbols are a new data type in JavaScript that you can use to add properties to objects without colliding with other strings:
  • ES7 Async Functions - /tonic/es7-async-functions
    Last edited 7 years ago
    Async functions are a much easier way to create asynchronous code that has the benefits of promises, but maintains the structure of your old synchronous code. Instead of attaching .then and .catch methods, you can you can use normal semantics and try/catch statements:
  • JSX in Tonic - /tonic/jsx-in-tonic
    Last edited 7 years ago
    Tonic supports JSX right out of the box. Make sure to include React and you're all set to go: