mis 2101 exam 3
What is your MPG if you have driven 320 Miles and used 20 Gallons of gas? (analyze the code)
16 (320/20)
Using the program myFunction.html, what is displayed when you pass 18 as the first number and 18 as the second number?
18
Using the program myFunction.html, what is displayed when you pass -3 as the first number and 7 as the second number?
22 (-3+-2+-1+0+1+2+3+4+5+6+7)
What's wrong with the statement listed below? var 365days = prompt ("How many days are in a year?");
365 Variable name cannot begin with a number!
Using the program myFunction.html, what is displayed when you pass 11 as the first number and 14 as the second number?
50 (11+12+13+14)
Using the program myFunction.html, what is displayed when you pass 13 as the first number and 18 as the last number?
93 (13+14+15+16+17+18)
Which of the following technologies are used to add interactivity to your site?
JavaScript
what is the answer if amISpeading(53)? speadlimit=55
No. You are not speeding. What's wrong with you?
A loop cannot start with a negative number? ex: for (var i = -10; i <= 30; i=i+5) {
false
Boolean Expressions evaluate to
true or false
Variables are identifiers for what?
values
what can a variable be named?
a letter, underscore, or $ any length as long as it doesn't start with a number and no spaces.