//1. collectKeys takes an object and returns an array filled with all of they keys inside of the collection.
Example:
var obj = {course: 'Reactor Prep', best: true};
collectKeys(obj) // ['course', 'best'];| import React, { Component } from 'react' | |
| import { Redirect } from 'react-router' | |
| export default class ContactForm extends Component { | |
| constructor () { | |
| super(); | |
| this.state = { | |
| fireRedirect: false | |
| } | |
| } |
A simple bar chart build using data from an external JSON file.
| var HashTable = function() { | |
| this._storage = []; | |
| this._count = 0; | |
| this._limit = 8; | |
| } | |
| HashTable.prototype.insert = function(key, value) { | |
| //create an index for our storage location by passing it through our hashing function | |
| var index = this.hashFunc(key, this._limit); |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
| Key/Command | Description |
|---|---|
| Tab | Auto-complete files and folder names |
| Ctrl + A | Go to the beginning of the line you are currently typing on |
| Ctrl + E | Go to the end of the line you are currently typing on |
| Ctrl + U | Clear the line before the cursor |
| Ctrl + K | Clear the line after the cursor |
| Ctrl + W | Delete the word before the cursor |
| Ctrl + T | Swap the last two characters before the cursor |
| 'use strict'; | |
| // Add ECMA262-5 method binding if not supported natively | |
| // | |
| if (!('bind' in Function.prototype)) { | |
| Function.prototype.bind= function(owner) { | |
| var that= this; | |
| if (arguments.length<=1) { | |
| return function() { | |
| return that.apply(owner, arguments); |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.