Skip to content

Instantly share code, notes, and snippets.

View mattnwa's full-sized avatar
🏠
Working from home

Matt Luker mattnwa

🏠
Working from home
  • Bentonville, Ar
View GitHub Profile
// Bonfire: Find the Longest Word in a String
// Author: @mattnwa
// 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) {
strSplit = str.split(' ');
var longest = 0;
for(var i =0; strSplit.length >i; i++){
// Bonfire: Check for Palindromes
// Author: @mattnwa
// Challenge: http://www.freecodecamp.com/challenges/bonfire-check-for-palindromes
// Learn to Code at Free Code Camp (www.freecodecamp.com)
//Steps to think through..
// 1. we need to remove unneeded whitespace/numbers and whitespace. Needs to be lower case.
// 2. Need to then create another variable with the string turned into an array and reverse joined.
// 3. Compare the two created strings to see if they match. return F/A statement.
// Bonfire: Reverse a String
// Author: @mattnwa
// Challenge: http://www.freecodecamp.com/challenges/bonfire-reverse-a-string
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function reverseString(str) {
var result = str.split('').reverse();
return result.join('');
}
@mattnwa
mattnwa / index.html
Last active August 29, 2015 14:28
jQuery Social Comment Example
<body>
<div class="header">
<h2>Social Status Update Example</h2>
<h5>Using jQuery to add posts and remove on click. By Matt Luker </h5>
</div>
<div class="container">
<form>
<div class="form-group">
<textarea class="form-control status-box" rows="2" placeholder="What's on your mind?"></textarea>
</div>