Skip to main content

Posts

Showing posts with the label ES6

The Symbol in JavaScript is the new type of DataType. What they actually do?

The Symbol  is a new primitive type introduced in ES6 . It’s introduced in ES6. Symbols are completely unique identifiers. Just like their primitive counterparts (Number, String, Boolean), they can be created using the factory function Symbol () which returns a Symbol.  List of Symbol Features:- 1.       The Symbol is used to create a unique identifier and every symbol value returned from Symbol() is unique. 2.       The symbol does not auto convert to strings. 3.       Symbols are great to be used as the key in objects. 4.       Two Symbols with the same description is never equal. 5.       The data type symbol is a primitive data type. 6.       While iterating over Objects, Symbol as the key won't be accessible. They become hidden properties. But, Object.assign({}) , Symbol will also get copied. Syntax: -...

What is ECMAScript (ES6) in Angular 2?

The ECMAScript is known as now ES6. The ES6 is version 6. The ES6 is a scripting language and it developed by Ecma International org. The JavaScript is an implementation of ES6. The ES6 features are fully supported to latest browsers(chrome, Firefox etc.) Go to in detail  http://en.wikipedia.org/wiki/ECMAScript A basic simple example with live demo of Add two numbers using ES6 as given below.   let AddTwoNum = (num1,num2) => num1+num2;   console.log(AddTwoNum(4,3)); For the output go to link  http://www.es6fiddle.com/i8fi4ths/

Why Angular v2.0? Why not Angular 1.x+?

Every AngularJs developer little bit confused and ask to angular and other community why angularjs 2.0 ? why not angular 1.x+?  First app with Angular 2 and ES6 Integration of Angular 1 and Angular 2 What are major changes in Angular 2? New Features of Angular 2 What is ECMAScript ES6? What is Traceur compiler? Today's I attend ngConf/ng-conf meeting I asked same question and the community speaker explained in detail and finally I got my answer. The Answers are as given below In Angular v2.0, we are using classes more than in Angular v1.x+ and the ES6 has a better classes syntax than ES5. The Goal of Angular v2.0 it should be declarative. The   Syntax of Angular v2.0 are human-readable and human-writable. The Angular v2.0 deals with server data in form of a JSON and its is structural types on the JSON as well as on the Angular API. The Angular v2.0 will be written in ES6 and it compiled into ES5 using " traceur ". The Angular users can write your c...