irdevconf - july 2016
a frontend developer
My home is naser.xyz,
and also you can find me with @snhasani ID almost all over the internet. from twitter, gmail, github, telegram... until fb, instagram and skype.
is Microsoft implementations version of Javascript.
It was a reverse-engineered version of Javascript, designed to be compatible with Netscape’s implementation.
The Netscape team submitted Javascript for official review in 1997,
and finally it become an ECMA defined language.
ECMA is an international standards organization (originally the European Computer Manufacturers Association), and they handle a number of specs, including C#, JSON, and Dart.
JavaScript is what everyone calls the language, but that name is trademarked (by Oracle, which inherited the trademark from Sun). Therefore, the official name of JavaScript is ECMAScript.
At the end of July 2008, there was a TC39 meeting in Oslo, whose outcome was described as follows by Brendan Eich:
It’s no secret that the JavaScript standards body, Ecma’s Technical Committee 39, has been split for over a year, with some members favoring ES4 […] and others advocating ES3.1 […]. Now, I’m happy to report, the split is over.
The agreement that was worked out at the meeting consisted of four points:
This version went through several name changes:
May '95
Dec '95
Sep '95
1997
Aug '96
1999
1998
2009
2003
2015
2011
2016
Mocha (Brendan Eich, Netscape)
LiveScript
JavaScript
Edition 1
JScript (Microsoft)
Edition 2
Edition 3
Edition 4
Edition 5
Edition 5.1
Edition 6
Edition 7
ECMA-262 specification
Babel lets you transpile most ES6 code so it will work in browsers dating back to IE8. Don’t get left behind.
I’m waiting for browser support.
If you’re building any non-trivial app, you should be compiling anyway, for many reasons.
I don’t want to introduce a compile step.
things that superficially look like syntactic sugar (such as classes and modules) bring much-needed standardization to the language and serve as foundations for future features.
Several features were not created for normal programmers, but for library authors (e.g. generators, iterators, proxies). “Normal programmers” only need to know them superficially if at all.
Is ES6 bloated?.
ES6 is JavaScript. It’s the current, official JavaScript standard, and all the new books and tutorials you’ll want to read are going to use ES6 examples
I’m a beginner and learning ES6 while I’m trying to learn JavaScript sounds hard.
for writing:
adopting de facto standards where possible. Examples are:
modules
class declarations
lexical block scoping
iterators and generators
promises for asynchronous programming
destructuring patterns
export function exampleFunction() {
console.log('I\'m an example. #TrueStory');
}
import { exampleFunction } from './example-function';
import BaseController from './base-controller';
export default class ExampleController extends BaseController {
constructor() {
super();
exampleFunction();
}
doSomething() {
console.log('What should I do? Change the DOM?');
}
}
button.addEventListener('click', function(event) {
console.log('The button has recevied a click', event);
});
button.addEventListener('click', event => {
console.log('The button has recevied a click', event);
});
// Simple string substitution
var name = "Gandalf";
console.log('Yo, ${name}!');
// => "Yo, Gandalf!"
var a = 10;
var b = 10;
console.log('a+b = ${a+b}.');
//=> a+b = 20.
function fn() { return "I am a result. Rarr"; }
console.log('foo ${fn()} bar');
//=> foo I am a result. Rarr bar.
// Simple string substitution
var name = "Gandalf";
console.log('Yo, ${name}!');
// => "Yo, Gandalf!"
var a = 10;
var b = 10;
console.log('a+b = ${a+b}.');
//=> a+b = 20.
function fn() { return "I am a result. Rarr"; }
console.log('foo ${fn()} bar');
//=> foo I am a result. Rarr bar.
twitter: @tehranjs
CV to n.kashani at karinaco dot com