Skip to content

Instantly share code, notes, and snippets.

View dannyfritz's full-sized avatar
🐦
chirping

Danny Fritz dannyfritz

🐦
chirping
View GitHub Profile
var age_group =
age > 70 ? 'se' :
age > 60 ? 'si' :
age > 50 ? 'fi' :
age > 40 ? 'fo' :
age > 30 ? 'th' :
age > 20 ? 'tw' :
'un';
...
var legacyScriptsArr = [
'./path/to/legacy-script1.js',
'./path/to/legacy-script2.js',
'./path/to/legacy-script3.js',
'./path/to/legacy-script4.js',
'./path/to/legacy-script5.js',
];
@dannyfritz
dannyfritz / setup.md
Last active June 21, 2019 15:07 — forked from w3cj/setup.md

Intro to Programming with JavaScript

Standard

Write, mentally evaluate, and store the result of JS expressions

Objectives

  • Describe what a programming language is
  • List reasons for learning JavaScript
@dannyfritz
dannyfritz / example.js
Last active January 12, 2018 05:36 — forked from bthesorceror/example.js
Promises
function loadFile(filename) {
let script = ... create script with file
let promise = new Promise()
script.onload = promise.resolve
return promise
}