This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const a = 2 | |
const b = '2' | |
const c = a + b | |
const d = a - b | |
console.log(c) | |
console.log(d) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const a = false == '0' | |
const b = false === '0' | |
console.log(a) | |
console.log(b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************** | |
- THEMEPUNCH TOOLS Ver. 1.0 - | |
Last Update of Tools 27.02.2015 | |
*********************************************/ | |
/* | |
* @fileOverview TouchSwipe - jQuery Plugin | |
* @version 1.6.9 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//direct render with JSX | |
React.render( | |
<h1>Hello my niggas!</h1>, | |
document.getElementById('example') | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
httpGet('http://example.com/file.txt') | |
.then( | |
value => { | |
console.log('Contents: ' + value); | |
}, | |
reason => { | |
console.error('Something went wrong', reason); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//array | |
var [name, lastname] = ["Julián", "Castellanos"]; | |
console.log(name); // "Julián" | |
console.log(lastname); // "Castellanos" | |
//object | |
var person = { name: "Carlos", lastname: "Castellanos" }; | |
var { name, lastname } = person; | |
console.log(name); // "Julián" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//string | |
let name = "Julián"; | |
let lastname = "Castellanos"; | |
console.log("My name is: ${name} ${lastname}"); // My name is: Julián Castellanos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//null values | |
class Person { | |
constructor(name = "Julián", lastname = "Castellanos") { | |
... | |
} | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this scope | |
var obj = { | |
foo : function() {...}, | |
bar : function() { | |
document.addEventListener("click", (e) => this.foo()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
const numDays = 7; | |
var setNumDays = function() { | |
numDays = 8; //ERROR numDays is ReadOnly | |
} | |
setNumDays(); | |
})() |
NewerOlder