Skip to content

Instantly share code, notes, and snippets.

@OlehRovenskyi
OlehRovenskyi / this.js
Last active June 26, 2017 20:00
keywoard this
// this
var a = {
name: 'Вася',
getName: function () {
return this.name;
},
getContext: function() {
return this;
}
@OlehRovenskyi
OlehRovenskyi / function.js
Last active June 26, 2017 19:58
js function
// function
function hello() {
return 'Hello';
}
hello() // hello
hello() // hello
// function with params
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"noEmit": true,