Skip to content

Instantly share code, notes, and snippets.

View arecvlohe's full-sized avatar
🚫
End ASF Mascotry / Drop ICE

Adam Recvlohe arecvlohe

🚫
End ASF Mascotry / Drop ICE
View GitHub Profile

ES2015

Let’s get started with Node. Node has many of the features that we will be covering today, so if you want to get up and running with ES6, Node is the way to go.

- Step 1: Download Node
    - Go to https://nodesjs.org
    - Download for Windows or Mac
- Step 2: Download NVM
    - Go to https://github.com/creationix/nvm
  • Download for Windows or Mac
'use strict'
function stringCount(object) {
let count = 0
Object.keys(object).forEach(key => {
if (typeof object[key] === 'string')
count++
})
return count
}
'use strict'
function stringCount(object) {
let count = 0
if (typeof object === 'object' && !Array.isArray(object) && object) {
Object.keys(object).forEach(key => {
if (typeof object[key] === 'string')
count++
if (Array.isArray(object[key]))
count+= stringCount(object[key])
stringCount({
name: 'Adam',
age: 29,
friends: ['Jane', 'Joe', 'Jake', 'Johnny'],
eyeColor: null,
status: undefined,
address: {
state: 'Florida',
city: 'St. Pete'
}
@arecvlohe
arecvlohe / .eslintrc
Last active June 21, 2016 14:05
ESLint Config
{
"extends": "airbnb-base",
"parserOptions": {
"ecmaFeatures": {
"arrowFunctions": true,
"destructuring": true,
"blockBindings": true,
"defaultParams": true,
"forOf": true,
"modules": true,
@arecvlohe
arecvlohe / esnextbin.md
Last active August 17, 2016 02:23
esnextbin sketch
@arecvlohe
arecvlohe / esnextbin.md
Last active August 17, 2016 03:41
esnextbin sketch
@arecvlohe
arecvlohe / esnextbin.md
Last active August 18, 2016 12:40
esnextbin sketch

Widget Menagerie