Skip to content

Instantly share code, notes, and snippets.

@harrysboileau
harrysboileau / form-validator.js
Created October 19, 2013 15:36 — forked from ksolo/form-validator.js
Form Validation
// shorthand for $(document).ready();
$(function(){
//Your code...
});
@harrysboileau
harrysboileau / zoo.html
Last active December 25, 2015 19:19 — forked from dbc-challenges/zoo.js
<!doctype html>
<html>
<head>
<script src="zoo.js"></script>
</head>
<body>
</body>
</html>
@harrysboileau
harrysboileau / index.html
Last active December 25, 2015 19:09 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>

Instructions:

  1. Download this application skeleton.
  2. Convert the app to use AJAX.
  3. Add any files you changed to your gist and submit your code.
@harrysboileau
harrysboileau / gist:6015621
Last active December 19, 2015 20:49
I know this isn't correct, but it's currently as far as I've been able to get with SuperFizzBuzz. I can return 'FizzBuzz' when I have a multiple of 15, Fizz when 3, Buzz when 5, but I am stuck on how to put those values back into the array, and ultimately return that altered array. Any thoughts/direction/hint would be very appreciated, thanks!
def super_fizzbuzz(array)
new_array = []
array.each do |x|
if x % 15 == 0
new_array.push('FizzBuzz')
elsif x % 3 == 0
new_array.push('Fizz')
elsif x % 5 == 0
new_array.push('Buzz')
else