This file contains hidden or 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
[ | |
{ | |
"id": "90ff6571-4941-42a7-8eb3-063331241a20", | |
"firstName": "Marshall", | |
"lastName": "Soto", | |
"age": 29, | |
"email": "[email protected]", | |
"active": true, | |
"lastLogin": "2014-08-07T03:35:08-01:00" | |
}, |
This file contains hidden or 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() { | |
var Gallery = (function() { | |
var stageImageContentTemplate = ''; | |
var stageImageTemplate = ''; | |
var viewMoreTemplate = ''; | |
var modalTemplate = ''; | |
var slideTemplate = ''; | |
var modalSlideTemplate = ''; | |
var modalImageTemplate = ''; |
This file contains hidden or 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 whoAmI = name => field => location => | |
name + ' is a ' + field + ' from ' + location; | |
const first = whoAmI('Liccy Fuentes'); | |
const two = first('Front End Developer'); | |
console.log(two('Florida')); | |
function curry(fn, ...args1) { | |
return (...args2) => fn(...args1, ...args2); | |
} |
This file contains hidden or 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 sentence = ( p = 'text some txt' ) => p.split(' ').filter(v => !(v.length % 2)).sort((a, b) => a.length - b.length).toString().replace(/\W/g, ' '); | |
sentence('longer sentence with in to blah!'); // "in to with longer sentence" |
This file contains hidden or 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 = (type) => { | |
const t = 'Hi ' + type; | |
const s = () => { return t;} | |
return s; | |
} | |
const b = a('closure'); | |
b(); | |
This file contains hidden or 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 C = [16, 9, 12, 4, 4, 3, 4, 7, 6, 4, 12, 15, 4, 11, 12, 15, 8, 12, 10, 10]; | |
const F = C.map(n => Math.round(n * (9/5)) + 32); | |
// [61, 48, 54, 39, 39, 37, 39, 45, 43, 39, 54, 59, 39, 52, 54, 59, 46, 54, 50, 50] | |
const avg = F.reduce((s, e) => s + e, 0) / F.length; //48.05 | |
Math.round(avg) // 48 |
This file contains hidden or 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 numbers = [1,2,3,4,5,6,7,8,9,10]; | |
const getEvenNumbers = numbers.filter(n => n % 2 === 0); | |
getEvenNumbers // [2, 4, 6, 8, 10] | |
const double = getEvenNumbers.map(n => n * 2); | |
double // [4, 8, 12, 16, 20] | |
numbers // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] |
This file contains hidden or 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 flatten = arr => arr.reduce( | |
(a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), [] | |
); | |
testArr = [[1,2,[3]],4] | |
console.log(flatten(testArr)); |
This file contains hidden or 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
[ | |
{"code":"ab","name":"Abkhaz","nativeName":"аҧсуа"}, | |
{"code":"aa","name":"Afar","nativeName":"Afaraf"}, | |
{"code":"af","name":"Afrikaans","nativeName":"Afrikaans"}, | |
{"code":"ak","name":"Akan","nativeName":"Akan"}, | |
{"code":"sq","name":"Albanian","nativeName":"Shqip"}, | |
{"code":"am","name":"Amharic","nativeName":"አማርኛ"}, | |
{"code":"ar","name":"Arabic","nativeName":"العربية"}, | |
{"code":"an","name":"Aragonese","nativeName":"Aragonés"}, | |
{"code":"hy","name":"Armenian","nativeName":"Հայերեն"}, |
NewerOlder