<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <link rel="stylesheet" type="text/css" href=" ../stylesheets/default.css">
  <link rel="stylesheet" type="text/css" href=" ../stylesheets/blog.css">
  <title>@ndrew ©rowley</title>
</head>

<body>
<!--  
  <header>
    <nav>
      <ul>
        <li>Your menu</li>
      </ul>
    </nav>
  </header>
 --> 
  <section>
  
    <article>
      <header>
        <h2>JavaScript vs. Ruby -  A Technical Blog</h2>
        <p>Posted on <time datetime="2016-02-28">March 4th 2016</time> by <a href="http://andyvegas.github.io/index.html">andrew crowley</a> </p>
      </header>
      <p>
Ruby and Javascript are fairly similar as they both use Object Oriented Programming, they are both dynamic, general purpose languages as well as scripting-languages.  JS is used to make interactive client-side webpages, whereas Ruby is used mainly on the backend.
</p>

<p>Diving deepers, we're going to compare Ruby hashes and JavaScript objects. Ruby's hash and JavaScript's object do roughly the same thing—they both represent a collection of values accessed using keys. They also look similar. Their syntax is very similar, but in Ruby, we call the label a key, and in JavaScript, we call it a property.  Let's look at how you might create a hash and an object with literal notation:</p>

<pre><code>
# Ruby hash:
poppa = { name: "Andy", age: 35, height: 73 }
// JS object:
var poppa = { name: "Andy", age: 35, height: 73 };
</code></pre>


<p>Accessing values is also similar in both languages:</p>

<pre><code>
# Ruby hash:
poppa[:age]
=> 35
// JS object:
poppa.age;
=> 35
</code></pre>


<p>Ruby hashes and JavaScript objects are both flexible ways of storing data. Ruby hashes have many built in methods to manipulate their data, whereas JavaScript allows you to write your own functions to manipulate your object. In this way, Ruby hashes are meant for storing and manipulating large sets of data in the back-end, while JavaScript is better for storing and accessing data in the front end.</p>

    </article>
    
  </section>

  <aside>
    <h2>About section</h2>
    <p>Assignment 7.10 - Technical Blog </p>
  </aside>

  <footer>
    <p>copyright 2016 andrew crowley</p>
  </footer>
</body>
</html>
Add initial 7.10 blog assignment
Add initial 7.10 blog assignment
