-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathConditionsAndLoops.js
More file actions
70 lines (37 loc) · 1.78 KB
/
ConditionsAndLoops.js
File metadata and controls
70 lines (37 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
// Copyright (c) 2023 Promineo Tech
// Author: Promineo Tech Academic Team
// Subject: Conditions & Loops Lab
// JavaScript Week 02 Lab
//
// create a variable called speedLimit and another called mySpeed
// set their values to numbers between 1 and 100
// using a conditional, determine if mySpeed is greater than the speedLimit
// if true, print "Slow Down! Mom is mad!" to the console
// if mySpeed is equal to the speedLimit, print "Everyone is happy!" to the console
// if mySpeed is less than the speedLimit, print "Speed up! Dad is mad!"
// create two variables, one named alarmSet, the other openDoor
// set them to a boolean value
// using a conditional, determine if alarm is set.
// if alarm is set and door is set to open, print "Sound Alarm!" to the console
// otherwise, print "Everything is fine." to the console.
// create two variables, username and password
// create a conditional, if the username is "Tommy123" and the password is "12345"
// or the username is "Timmy456" and the password is "6789", print "Admin Login Successful" to the console
// otherwise, print "Admin Access Denied"
// write code that will set the value of studentClass based on studentGrade
// studentGrade will be K-12
// K-6 will be Elementary
// 7-8 will be Middle
// 9 will be Freshman, 10 Sophomore, 11 Junior, 12 Senior
// Anything other than these values will return "Error" to the console
// write a for loop that will iterate backwards from 10 to -10
// write a do/while loop that prints 1 through 50
// edit the previous do/while loop so that it prints the remainder when the loop number is divided by 4
// Someone messed up the following for loop
// fix the following infinite loop, uncomment to test
/*
for(let i = 11; i > 10; i++){
console.log(i);
}
*/