Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

141 lines (111 sloc) 2.827 kb
<!doctype HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Intro to JavaScript: Part 5</title>
<link href="http://fonts.googleapis.com/css?family=Droid+Sans|Droid+Sans+Mono|Tangerine" rel="stylesheet" type="text/css" />
<link href="css.css" rel="stylesheet"/>
</head>
<body>
<div id="topinfo">
</div>
<div id="info">
<p>Press <span class="key">&rarr;</span> key to advance.
Zoom in/out: <span class="key">Ctrl or Command</span> + <span class="key">+/-</span>.
</p>
</div>
<div id="presentation">
<div id="presentation-counter"></div>
<div id="slides">
<div class="slide intro">
<header><hgroup>
<h1>Basic JavaScript: V</h1>
<h2>Estelle Weyl</h2>
<h3>Stuff we're skipping</h3>
</hgroup></header>
</div>
</section>
</div>
<div class="slide normal">
<header><h1>Regular Expressions</h1></header>
<section class="content">
<ul>
<li>regularExpression object</li>
<li>regEx syntax</li>
<li>search and replacing with regEx</li>
</ul>
<pre contenteditable></pre>
</section>
</div>
<div class="slide normal">
<header><h1>Date Objects</h1></header>
<section class="content">
<ul>
<li>var today = new Date();</li>
<li>var year = today.getFullYear();</li>
<li>var month = today.getMonth(); // 0 - 11</li>
<li>var date = today.getDate(); // 1 - 31</li>
<li>var dayOfWeek = today.getDay(); // 0 - 6</li>
</ul>
</section>
</div>
<div class="slide normal">
<header><h1>Number</h1></header>
<section class="content">
<ul>
<li>isNaN(x);</li>
<li>parseInt(x);</li>
<li>parseFloat(x);</li>
<li>num.toFixed(n)</li>
<li>Math.Round(x);</li>
<li>Math.floor(x)</li>
<li>Math.sqrt(x)</li>
<li>Math.abs(x)</li>
</ul>
<pre contenteditable></pre>
</section>
</div>
<div class="slide normal">
<header><h1>Switch statement</h1></header>
<section class="content">
<pre contenteditable>var rainbow = prompt('Color');
var teletubby;
switch (rainbow.toLowerCase()) {
case "purple":
teletubby = "Tinky Winky";
break;
case "green":
teletubby = "Dipsy";
break;
case "yellow":
teletubby = "Laa-Laa";
break;
case: "red":
teletubby = "Po";
break;
default:
teletubby = "You don't watch enough TV";
}
</pre>
</section>
</div>
<div class="slide normal">
<header><h1>Ternary Operator</h1></header>
<section class="content">
<pre contenteditable>
(condition)? if true : if false;
var IQ = () ? "glowing" :
</pre>
</section>
</div>
<div class="slide intro">
<header><h1>Next</h1></header>
<section class="content">
<a href="part_06.html">Go</a>
</section>
</div>
</div>
<iframe src="console/index.html" id="console" frameborder="0"></iframe>
</div>
<script src="slides.js"></script>
</body> </html>
Jump to Line
Something went wrong with that request. Please try again.