<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Differences between Arrays and Hashes</title>
</head>
<body>

<header>
	<h1>Differences between Arrays and Hashes</h1>
	<h2>08.12.15</h2>
</header>

<p1>This week at DBC, we learned about arrays and hashes. I'd like to break down the differences this week and explain when you should use them in hopes of better understanding the material myself. </p1>

<p2>But first, the similarities! Arrays and hashes are both used within Ruby to store information which can be looked up or retrived at a later time. Arrays are usually lists - collections of data stored in an orderly way. So for instance, if you had three cats and their names were Jim, Bob, and Charlie, you could create an array that looked like this:

```	 Ruby
["Jim", "Bob", "Charlie"]
```
</p2>

<p3>Hashes store information as well but what type of information and how it's stored differs. Hashes usually have a value and then a pair associated with that value. Using the example from above, imagine we had three pets named Jim, Bob, and Charlie. But instead of being cats, they were a fish, a bird, and a dog. Hashes would work really well for this! This is what it'd look like:

``` Ruby
pets-at-home = {
	"Jim" => dog,
	"Bob" => bird,
	"Charlie" => fish,
}

```

Hashes are often likened to dictionaries in the coding world because just like how words in the dictionary always have a definition associated with it, hashes have values that have something associated with is as well! You'd use hashes whenever you want to associate items at a store with their price or if you want to remember who drives what car. The key to understanding hashes is: are you trying to associate one thing with another?
</p3>

<p4>Hope that helps explain what the differences are between arrays and hashes. </p4>

</body>
</html>


Add technical blog for week 3 - hashes and arrays
Add technical blog for week 3 - hashes and arrays
