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!
“The quicker you let go of old cheese, the sooner you find new cheese.” -- Spencer Johnson, Who Moved My Cheese
Recommendations:
- Use
h1
only for the lecture title. - For greater visual clarity between sections, avoid using
h3
's (###
), instead:- use
h2
s (##
) for sections - use
h4
s (####
) for sub-sections - and use
strong
(**strong**
) for sub-sub-sections -- (make sure there's a line break above and below).
- use
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"!
- Code Smells - solution
- Bonus: Find the Cheese - solution
- The Docs
- Wallace & Gromit
- Must Read: Who Moved My Cheese