Skip to content

Instantly share code, notes, and snippets.

@nathanallen
Last active March 23, 2016 19:09
Show Gist options
  • Save nathanallen/63fdece5262df35329fa to your computer and use it in GitHub Desktop.
Save nathanallen/63fdece5262df35329fa to your computer and use it in GitHub Desktop.

Intro Cheese

Objectives
Review an example lecture template in markdown
Identify 3 unique attributes of cheese
Build a fort out of cheese

Let's explore cheese formatting lectures in markdown.

Pro-Tip: Make sure to look at the raw markdown for this page!

Section Heading (##)

“The quicker you let go of old cheese, the sooner you find new cheese.” -- Spencer Johnson, Who Moved My Cheese

Sub-Section (####)

Recommendations:

  • Use h1 only for the lecture title.
  • For greater visual clarity between sections, avoid using h3's (###), instead:
    • use h2s (##) for sections
    • use h4s (####) for sub-sections
    • and use strong (**strong**) for sub-sub-sections -- (make sure there's a line break above and below).

Sub-Topic (**Sub-Topic**)

Let's talk about code-blocks.

// path/to/directory/file.js  --> highly recommended you indicate file/directory in a comment

var cheese = ["brie", "gouda", "cheddar"]

function last(arr){
  console.log("beep bop boop"); // this is not a return value
  return arr[arr.length-1];
}

last(cheese) //=> "cheddar"

Use comments to indicate the return value of functions/variables. But watch out to disambiguate between output that is a console.log vs a return. They are very different!

Questions

**How would you grab `"gouda"` from the `cheese` array!?** (Click Here)
```js cheese[1] // "gouda" ```

Pro-Tip: <detail><summary> blocks (like above) are amazing! Just make sure to indicate to "click here"!

Exercises

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment