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
#!/usr/bin/env python | |
import os | |
import sys | |
import re | |
firstLower = lambda s: s[:1].lower() + s[1:] if s else '' | |
STYLE_EXT = '.scss' |
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 whatDoesItDo(val){ | |
return val ? 1 : 2; | |
} |
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
// set up arrays | |
var numbers = [1,12,4,18,9,7,11,3,101,5,6]; | |
var strings = ['this','is','a','collection','of','words']; | |
// array.reduce - find largest number | |
var largestValue = numbers.reduce(function(x,y){ return x > y ? x : y }); | |
console.log('largest number: ' + largestValue); | |
// array.reduce - find longest string |