Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Initial class updates
  • Loading branch information
drm10001 committed Feb 24, 2020
1 parent 8341470 commit c7157c1
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
16 changes: 16 additions & 0 deletions index.html
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./main.css">
</head>
<body>
<h1>JavaScript Concepts pt. 2</h1>

<p>We'll learn some more JS concepts today including Objects, arrays, and forms</p>

<form>

</form>
<script src="intermediate.js"></script>
</body>
</html>
37 changes: 37 additions & 0 deletions intermediate.js
@@ -0,0 +1,37 @@
function checkForm() {
var formCount = document.forms.length;

if(formCount > 0) {
return true;
} else {
return false;
}
}

// AND/OR
var bool1 = true;
var bool2 = false;

if(bool1 && bool2) {
console.log("AND");
} else if(bool1 || bool2 && 1 > 3) {
console.log("OR");
}

// Ternary operators

var result = (bool1) ? "The expression is true" : "The expression is false";
console.log(result);

var personInfo = {
firstName: "Joe",
lastName: "Smith",
state: "CT",
zipCode: "06111",
fullName: function() {
return this.firstName + " " + this.lastName;
}
};

console.log(personInfo.firstName);
console.log(personInfo.fullName());
Empty file added main.css
Empty file.

0 comments on commit c7157c1

Please sign in to comment.