Skip to content

Instantly share code, notes, and snippets.

View romain130492's full-sized avatar

Rouiller Romain romain130492

View GitHub Profile
@romain130492
romain130492 / differences.md
Last active April 7, 2020 02:26
Const vs Let vs Var - #Javascript
  • Redefining :

Const ==> Constant : Cannot be reassign. Example :

const name='Romain';
name='Thomas'
console.log(name) ==> Error   

Const cannot be reassigned but can be manipulated

@romain130492
romain130492 / equals_operators.md
Last active February 29, 2020 05:30
Equals operators (==) VS (===) - Javascript
  • (==)(!=) (==)(!=) considers the value but not the type

Example :

0=='0'  //==> True
  • (===)(!==)
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@romain130492
romain130492 / Async Function
Last active February 24, 2020 14:23
Async Function
init(){
that =this;
async function run() {
await that.createIsoFromCurrentDay()
await that.checkIfEvent()
await that.getOlderEvent()
await that.orderEventsByTime()
}
run()
}
@romain130492
romain130492 / Conditionnal in variable
Last active February 24, 2020 14:24
Conditionnal in variable
arrayDayEvents.length == 0
? (this.noEvent = true)
: (this.noEvent = false)
Shorter Version
this.noEvent = arrayDayEvents.length == 0