Skip to content

Instantly share code, notes, and snippets.

@JoeShep
JoeShep / object.js
Created June 6, 2017 16:11
Object example
const song = {
title: "Private Idaho",
artist: "The B-52s",
plays: 120,
album: "Wild Planet",
bandMembers: [
{name:"Fred", roles: {vocals: "lead", instrument: null} }
// {"Cindy",
// {"Ricky",
// {"Keith",
@JoeShep
JoeShep / test.md
Created June 13, 2017 14:36
Markdown example

ES6 Awesomeness

this should be intalicized

this should be bold

  • Task one
  • task two
  • buy lunch
@JoeShep
JoeShep / arrays.js
Created June 13, 2017 16:48
array methods
let colors = ["red", "blue", "green", "yellow", "orange", "teal"];
// let colorStrings = []
// colors.forEach(function(item) {
// colorStrings.push("I like the color" + " " + item)
// });
// console.log("new array", colorStrings);
let reversedColors = colors.map( function(item) {
return item.split("").reverse().join("");
@JoeShep
JoeShep / block-module.js
Created June 19, 2017 14:39
An ES6 module; alternative to iife syntax
{
let planetsArr = [];
let dwarfPlanets = [];
let planetsLandedOn = 0;
planetsArr.push("mercury", "Venus", "earth", "MArs", "jupiter", "saturn", "uranus", "Neptune");
let planets = Object.create(null);
planets.setPlanetsLandedOn = function(count) {
@JoeShep
JoeShep / lodash-test.js
Created July 6, 2017 20:06
A couple of lodash methods to whet your appetite
// *********** Simple but awesome ***********
console.log("random num", _.random(10, 20));
// *********** Loop it ***********
_.times(5, function(i) {
console.log("adding", i + 2);
});
let testArr = ["wow", "neat", "cool"];
Fundamental review of array methods in JS
@JoeShep
JoeShep / README_HOW_TO.md
Created January 26, 2022 16:17 — forked from heymonicakay/README_HOW_TO.md
Some tips on how to create a readable README to show off your project.

Add a README To Your Project

You can add a README file to your repository to tell other people why your project is useful, what they can do with your project, and how they can use it.

What's in a README?

README files typically include information on:

  • Primary Features - What does this project do?
  • Target Audience - Who is it for?
  • Purpose - Why the project is useful/what problem does it solve?