Answers for "es6 features in javascript"

2

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.
Posted by: Guest on October-05-2020
0

es6 features in javascript

// app.js
import * as math from "lib/math";
alert("2π = " + math.sum(math.pi, math.pi));
Posted by: Guest on May-05-2021
0

es6 features in javascript

// app.js
import ln, {pi, e} from "lib/mathplusplus";
alert("2π = " + ln(e)*pi*2);
Posted by: Guest on May-05-2021
0

es6 features in javascript

// otherApp.js
import {sum, pi} from "lib/math";
alert("2π = " + sum(pi, pi));
Posted by: Guest on May-05-2021
0

es6 features in javascript

// lib/math.js
export function sum(x, y) {
  return x + y;
}
export var pi = 3.141593;
Posted by: Guest on May-05-2021
0

es6 features in javascript

// lib/mathplusplus.js
export * from "lib/math";
export var e = 2.71828182846;
export default function(x) {
    return Math.log(x);
}
Posted by: Guest on May-05-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language