- where/how/what?
- variables
- types in js
- conditionals
- loops
- operator precedence
- functions
- Type Conversion
- return values
- type of function?!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<titl>Assignment #5</titl> | |
</head> | |
<style> | |
.move-me { | |
height: 200px; | |
width: 200px; | |
position: absolute; | |
background-color: #ff0000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<titl>Assignment #5</titl> | |
</head> | |
<body> | |
<div>Input#1: <input type="text" id="one" value="" oninput="swapInput1()" /></div> | |
<div>Input#2: <input type="text" id="two" value="" oninput="swapInput2()" /></div> | |
<script> |
- When do you use a variable assignment definition and when would you use a regular definition?
- What's the difference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function typer(val) { | |
// Implement me! | |
if(typeof(val) === "number" || typeof(val) === "string"){ | |
return val; | |
} | |
else if(typeof(val) === "function" ) | |
{ | |
return val(); | |
} | |
else if(typeof(val) === "object"){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make this work! | |
// DO NOT DEFINE ARGUMENTS!!11one | |
function students() { | |
console.log("First student name: "); | |
console.log("Second student name: "); | |
console.log("Third student name: "); | |
console.log("Fourth student name: "); | |
console.log("Number of students: "); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// convert integer to string; 10 -> "10" | |
var foo = 10; | |
undefined | |
foo.toString(); | |
"10" | |
// convert string to integer; "10" -> 10 | |
var swing = "10"; |
NewerOlder