Skip to content

Instantly share code, notes, and snippets.

💀
永远死了

ean eanplatter

Block or report user

Report or block eanplatter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Loop vs forEach vs recursion</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
View student-questions.md

Student Questions

Here are a list of the answers to the given questions. I have omitted the questions because some of them are long.

JavaScript

Hello Student!

Here is your original code:

<button id="btn-0">Button 1!</button>
<button id="btn-1">Button 2!</button>
@eanplatter
eanplatter / scope-and-closures.md
Last active Oct 17, 2016
Scope issues with JavaScript
View scope-and-closures.md

Hello Student!

Here is your original code:

<button id="btn-0">Button 1!</button>
<button id="btn-1">Button 2!</button>
<button id="btn-2">Button 3!</button>

<script type="text/javascript">
  var prizes = ['A Unicorn!', 'A Hug!', 'Fresh Laundry!'];
@eanplatter
eanplatter / Counter.js
Created Aug 30, 2016
An attempt at doing an Elm architecture style React component.
View Counter.js
import React, { Component } from 'react'
import { render } from 'react-dom'
const INCREMENT = 'increment'
const DECREMENT = 'decrement'
class App extends Component {
// model
state = {
counter: 0
@eanplatter
eanplatter / LED.js
Created Aug 15, 2016
LED style number conversion in JavaScript / Node.
View LED.js
const argv = require('process').argv
/**
* numbers - an object which lists out the ascii art of each number.
* It's kind of weird that they key for each object is a string, and that
* the string is a number. Not conventional but convenient as it allows you
* to reference `numbers['0']` to get the property on the numbers object.
*/
const numbers = {
'0': {
You can’t perform that action at this time.