-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patht7-JavaScript.html
More file actions
75 lines (64 loc) · 3.25 KB
/
t7-JavaScript.html
File metadata and controls
75 lines (64 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheets/reset.css"/>
<link type="text/css" rel="stylesheet" href="stylesheets/t7-JavaScript.css"/>
<link type="text/css" rel="stylesheet" href="stylesheets/t7-gist-override.css"/>
<link href='http://fonts.googleapis.com/css?family=Lora:400,400italic|Merriweather:400,300,300italic,400italic,700italic,700|Open+Sans' rel='stylesheet' type='text/css'>
</head>
<body>
<header>
<div class="image"></div>
<h1>Ruby vs. JavaScript Cheat Sheet</h1>
<h2>Keeping it straight</h2>
<h3>February 26th, 2015 : 2 minutes</h3>
</header>
<div class="blog-text">
<section>
<p>I've spent 4-5 weeks learning Ruby and now I'm learning JavaScript for the very first time. As I learn JS, here are some of the differences that I want to keep straight.</p>
<div class="code-snippet-container">
<p class="language-label">Ruby</p>
<p class="language-label">JavaScript</p>
<p>...naming variables...</p>
<script src="https://gist.github.com/lynnetye/c8045355d5984bd15d74.js"></script>
<script src="https://gist.github.com/lynnetye/31fa0daf85a931ed7950.js"></script>
</div>
<div class="code-snippet-container">
<p>...determining an object's value type...</p>
<script src="https://gist.github.com/lynnetye/8802eeff4ac19bce4a38.js"></script>
<script src="https://gist.github.com/lynnetye/74c6b92d54fc175d53c8.js"></script>
</div>
<div class="code-snippet-container">
<p>...printing to the console...</p>
<script src="https://gist.github.com/lynnetye/82f1ddb0ab0ac31e4835.js"></script>
<script class="js-code-snippet" src="https://gist.github.com/lynnetye/1a45701ec7b948a9750a.js"></script>
</div>
<div class="code-snippet-container">
<p>...methods/functions...</p>
<script src="https://gist.github.com/lynnetye/7339c0f2abdd54938b6a.js"></script>
<script src="https://gist.github.com/lynnetye/c5b26c7dcbd5f7229e52.js"></script>
</div>
<div class="code-snippet-container">
<p>...comparison operators (all of those equal signs)...</p>
<script src="https://gist.github.com/lynnetye/1a60d9046d145ee4127f.js"></script>
<script src="https://gist.github.com/lynnetye/7c179ea157a4cdf5c896.js"></script>
</div>
<div class="code-snippet-container">
<p>...incrementing/decrementing by 1...</p>
<script src="https://gist.github.com/lynnetye/7d2488bfda048c57c97b.js"></script>
<script src="https://gist.github.com/lynnetye/6a4a574dfbc7966c55e9.js"></script>
</div>
<div class="code-snippet-container" id="extra-wide">
<p>...array syntax; finding the index...</p>
<script src="https://gist.github.com/lynnetye/306608cd38747b99666b.js"></script>
<script src="https://gist.github.com/lynnetye/a3634cffd35073e2d923.js"></script>
</div>
<div class="code-snippet-container" id="extra-wide">
<p>...objects vs. hashes...</p>
<script src="https://gist.github.com/lynnetye/78228fc84dbf6abc5be8.js"></script>
<script src="https://gist.github.com/lynnetye/e1db60138e5f8ce889a5.js"></script>
</div>
</section>
</div>
</body>
</html>