Skip to content

Instantly share code, notes, and snippets.

View jcastellanos003's full-sized avatar

Julián Castellanos jcastellanos003

  • Medellin - Antioquia
View GitHub Profile
@jcastellanos003
jcastellanos003 / math-ops.js
Created March 23, 2021 12:50
Math Operators
const a = 2
const b = '2'
const c = a + b
const d = a - b
console.log(c)
console.log(d)
@jcastellanos003
jcastellanos003 / equality.js
Last active March 23, 2021 12:42
Equality
const a = false == '0'
const b = false === '0'
console.log(a)
console.log(b)
/********************************************
- THEMEPUNCH TOOLS Ver. 1.0 -
Last Update of Tools 27.02.2015
*********************************************/
/*
* @fileOverview TouchSwipe - jQuery Plugin
* @version 1.6.9
*
//direct render with JSX
React.render(
<h1>Hello my niggas!</h1>,
document.getElementById('example')
)
httpGet('http://example.com/file.txt')
.then(
value => {
console.log('Contents: ' + value);
},
reason => {
console.error('Something went wrong', reason);
});
//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"
//string
let name = "Julián";
let lastname = "Castellanos";
console.log("My name is: ${name} ${lastname}"); // My name is: Julián Castellanos
//null values
class Person {
constructor(name = "Julián", lastname = "Castellanos") {
...
}
...
}
//this scope
var obj = {
foo : function() {...},
bar : function() {
document.addEventListener("click", (e) => this.foo());
}
}
(function(){
const numDays = 7;
var setNumDays = function() {
numDays = 8; //ERROR numDays is ReadOnly
}
setNumDays();
})()