Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

es6 features javascript

Default Parameters in ES6.
Template Literals in ES6.
Multi-line Strings in ES6.
Destructuring Assignment in ES6.
Enhanced Object Literals in ES6.
Arrow Functions in ES6.
Promises in ES6.
Block-Scoped Constructs Let and Const.
Comment

es6 features

Notable improvements in es6 would  be:

let and const Keywords
Arrow Functions
Multi-line Strings
Default Parameters
Template Literals
Destructuring Assignment
Enhanced Object Literals
Promises
Classes
Modules
Comment

es6 features in javascript

// app.js
import * as math from "lib/math";
alert("2π = " + math.sum(math.pi, math.pi));
Comment

es6 features in javascript

// lib/math.js
export function sum(x, y) {
  return x + y;
}
export var pi = 3.141593;
Comment

es6 features in javascript

// otherApp.js
import {sum, pi} from "lib/math";
alert("2π = " + sum(pi, pi));
Comment

es6 features in javascript

// lib/mathplusplus.js
export * from "lib/math";
export var e = 2.71828182846;
export default function(x) {
    return Math.log(x);
}
Comment

es6 features in javascript

// app.js
import ln, {pi, e} from "lib/mathplusplus";
alert("2π = " + ln(e)*pi*2);
Comment

es6 features

var asyncCall =  new Promise((resolve, reject) => {
   // do something
   resolve();
}).then(()=> {   
   console.log('DON!');
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery add to array with key 
Javascript :: mongoose save or update 
Javascript :: parse json to dart model 
Javascript :: firebase auth api key not valid. please pass a valid api key 
Javascript :: js join array 
Javascript :: create dynamic element in javascript 
Javascript :: javascript add element to array 
Javascript :: node.js copy to clipboard 
Javascript :: react-native-infinite-scroll-with-flatlist 
Javascript :: axios.filter 
Javascript :: apollo server change port 
Javascript :: angular return observable with error 
Javascript :: how to find out most repeated string in an array js 
Javascript :: get the last array element javascript 
Javascript :: how to get width in javascript 
Javascript :: javascript alert 
Javascript :: filter in js 
Javascript :: eventemitter in angular 
Javascript :: javascript global object 
Javascript :: javascript replace all string 
Javascript :: Error occurred while trying to proxy to: localhost:3000/ 
Javascript :: spread operator in javascript 
Javascript :: exec reges 
Javascript :: javascript max_value 
Javascript :: sequelize left join attributes 
Javascript :: js numbers only string 
Javascript :: javascript filter and order 
Javascript :: The document.getElementById() Method 
Javascript :: config mode en webpack 
Javascript :: javascript date format dd-mm-yyyy 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =