Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## JSDR213
## SEBR 0116

# Conditionals and Loops Lab

Expand Down Expand Up @@ -36,11 +36,12 @@ Run a For Loop that starts at 0, ends at 10, and logs each number squared (your

Create an array of foods, then loop through them. Run a conditional in your loop with the charAt[0] method so that you are only logging to your console foods that start with the letter F

## 8 - Even and Odd Numbers
## Bonus 8 - Even and Odd Numbers

Run a loop that goes between 20 and 40, but only logs Even numbers. Then create a new loop that does the same for Odds


## 9 - FizzBuzz!

## Bonus 9 - FizzBuzz!

A coding classic, run a loop that counts and logs every number between 1 and 30. If a number is divisible by 3, log "Fizz", if it is divisible by 5, log "Buzz", and if it is divisible by 3 and 5, log "FizzBuzz"
51 changes: 51 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
let Temperature = 80;
if (Temperature > 75) {
console.log("It is warm");
} else {
console.log("It is cold")
}

let softballTeamName =["Bill", "John", "Jim", "Tony", "Sam", "Caleb", "Carl", "Phil", "Lance"]
if (softballTeamName.length>=9){
console.log("Play ball!")
} else{
console.log("Not enough players")
}


let grade = 88;
if ((numericGrade)){
console.log("Please enter a valid grade");
if (numericGrade >= 90) {
console.log("A");
} else if (numericGrade >=80) {
console.log("B");
} else if (numericGrade >= 70) {
console.log("C");
} else if (numericGrade >=60) {
console.log("D");
} else {
console.log("Failing mark");
}
}

let checkingAccount = 2000.00
let savingsAccount = 3000.00
const actionType = ['Withdraw', 'Deposit', 'Transfer']
switch(actionType[1]) {
case 'Withdraw':
console.log(`Checking Account: $${checkingAccount - 100}`);
console.log(`Savings Account: $${savingsAccount}`);
break;
case 'Deposit':
console.log(`Checking Account: $ ${checkingAccount + 100.00}`);
console.log(`Savings Account: $${savingsAccount}`);
break;
case 'Transfer':
console.log(`Checking Account: $ ${checkingAccount - 100.00}`);
console.log(`Savings Account: $${savingsAccount + 100.00}`);
break;
default:
console.log('Error: Invalid Entry');
}