Skip to content

Instantly share code, notes, and snippets.

@shanimal
shanimal / SecretNumber.js
Last active September 24, 2016 07:48
Pick any number. Add the digits. Repeat until there is only one digit in your number. Multiply that by 5. Multiply that by 2. Subtract 2. Your number is 8.
/**
* Pick any number.
* Add the digits.
* Repeat until there is only one digit in your number.
* Multiply that by 5.
* Multiply that by 2.
* Subtract 2.
* Take the last digit in this number
* Your number is 8.
*/
@shanimal
shanimal / js-testing-playground.html
Created November 18, 2016 16:20 — forked from calvinf/js-testing-playground.html
JavaScript Testing Playground (Mocha, Chai, and $script)
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JavaScript Testing Playground</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/mocha/2.2.5/mocha.min.css" rel="stylesheet" />
<style>
*, *:before, *:after {