Sign in
Log inSign up
Basic ECMAScript 6 interview questions

Basic ECMAScript 6 interview questions

Sharad's photo
Sharad
·Oct 6, 2017

1. What is ES6 ?

Es6 or ECMASCRIPT 2015 is sixth major relaese of ECMAScript language which comes with lot of new features and syntax for writing web applications in javascript. As currently not all browsers supports ES6 , they supports pre versions of ES6 .SO to write web applications in ES6 that will supports all Browsers we needed tools like Babel and Webpack.

2. List some new features of E6

New Features in ES6.

  1. Support for constants (also known as “immutable variables”)
  2. Block-Scope support for both variables, contants, functions
  3. Arrow Functions
  4. Extended Parameter Handling
  5. Template Literals
  6. Extended Literals
  7. Enhanced Regular Expression
  8. Enhanced Object Properties
  9. Destructuring Assignment
  10. Modules ,Classes,Iterators ,Generators
  11. Support for Map/Set & WeakMap/WeakSet
  12. Promises, Meta-Programming ,Internationalization & Localization

Read More from es6-features.org

3. What is Babel ?

Babel is the one of the most popular javscript transpilar and becomes the industry standard.It allows us to write ES6 code and convert it back in pre-Es6 javascript that browser supports.

For example look the below code snippnet.

In ES6 (ECMASCRIPT 2015)

const PI = 3.141593;
PI > 3.0 ;
export{PI};

In ES5 after conversion

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
var PI = 3.141593;
PI > 3.0;
exports.PI = PI;

4. List steps to install Babel ?

Installation

In order to install Babel you requires node.js and npm .Make sure Node.js is installed on your server.

To check node installed or not run below commands on your terminal.

node -v 
npm -v

Installing Babel

We can install Babel CLI locally by running below command on terminal.

npm install --save-dev babel-cli

Read More from onlineinterviewquestions.com/es6-interview…

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct