Skip to content
Permalink
c7157c1e71
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
37 lines (30 sloc) 697 Bytes
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());