Skip to content

Instantly share code, notes, and snippets.

View jrjames83's full-sized avatar

Jeff James jrjames83

View GitHub Profile
@jrjames83
jrjames83 / index.html
Created November 27, 2015 23:29 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/gateko
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@jrjames83
jrjames83 / index.html
Created November 27, 2015 23:32 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/gateko
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@jrjames83
jrjames83 / index.html
Created November 28, 2015 00:01 — forked from anonymous/index.html
JS Bin [Line Charts with SVG and D3add your bin description] // source http://jsbin.com/mekeki
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[Line Charts with SVG and D3add your bin description]">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
@jrjames83
jrjames83 / index.html
Created November 28, 2015 01:03 — forked from anonymous/index.html
JS Bin [Line Charts with SVG and D3add your bin description] // source http://jsbin.com/xiqawa
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[Line Charts with SVG and D3add your bin description]">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
// Bonfire: Find the Longest Word in a String
// Author: @fcc0208647c
// Challenge: http://www.freecodecamp.com/challenges/bonfire-find-the-longest-word-in-a-string#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function findLongestWord(str) {
words = str.split(' ');
counts = [];
for (i=0;i<words.length;i++) {
// Bonfire: Title Case a Sentence
// Author: @fcc0208647c
// Challenge: http://www.freecodecamp.com/challenges/bonfire-title-case-a-sentence#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function titleCase(str) {
arr = str.toLowerCase().split(' ');
console.log(arr);
uppers = arr.map(upperWord);
propercase = uppers.join(' ');
// Bonfire: Return Largest Numbers in Arrays
// Author: @fcc0208647c
// Challenge: http://www.freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function largestOfFour(arr) {
maxes = [];
for (i=0;i<arr.length;i++){
// Bonfire: Confirm the Ending
// Author: @fcc0208647c
// Challenge: http://www.freecodecamp.com/challenges/bonfire-confirm-the-ending#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function end(str, target) {
if (str.slice(str.length-target.length, str.length) == target){
return true;
} else {
// Bonfire: Repeat a string repeat a string
// Author: @fcc0208647c
// Challenge: http://www.freecodecamp.com/challenges/bonfire-repeat-a-string-repeat-a-string#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function repeat(str, num) {
stuff = [];
if (num <= 0) {
return "";
} else {
// Bonfire: Slasher Flick
// Author: @fcc0208647c
// Challenge: http://www.freecodecamp.com/challenges/bonfire-slasher-flick#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function slasher(arr, howMany) {
return arr.slice(howMany, arr.length);
}