-
Which statement is not belong to the loop statement
- for
- while
- do...while
- if...else...
-
Which follows is true about loop statement
- For loop is used to iterate over a block of code a specified number of times.
- While loop is used to iterate over a block of code until a specified condition is met.
- For loop is more efficient than while loop.
- While loop is more efficient than for loop.
-
Which statement is not belong to the conditional statement
- if...else
- switch...case
- for...in
- if...
-
Which loop statement will execute the loop body at least once
- for
- while
- do...while
- for...in
-
Which statement is not belong to the jump statement
- break
- return
- throw
- jump js中不存在
-
The if...else...statement belong to
- Single conditional statement
- Loop statement
- Multiple statement
- Double conditional statement
-
The statement "do...while" will execute the loop body at least once. True
-
Empty statement is not allowed in a loop body. False
-
Every statement must be ended with a semicolon. True
-
Break statement can only be used in a loop body. False switch也可以用
-
Nest loop or conditional statement with too many levels is not a good practice. True
- The for-in loop is a special type of loop that iterates over the properties of an object, or the elements of
an array. True
- The for...of loop doesn't work with objects because they are not iterable. True
- Break statement
- Continue statement
- How many ways to write a conditional statement?
- How many ways to write a loop statement?
- What are the differences between for and while loop?
- What are the differences between break and continue in a loop?
- What are the differences between for...in and for...of?
- Write code to determine if the user's input number is positive, negative, or 0. If it is non-zero, parity still needs to be determined.
- Write code to output the level of the input score, 0-59 is F, 60-69 is D, 70-79 is C, 80-89 is B, 90-100 is A.
- Write code to output the first 10 Fibonacci numbers.
- Write code to determine the input year from user is leap year or not repeatedly until user input 'q'.
- Write code to output the first 10 prime numbers.
- Get a number from the user then output the sum of all the digits of the integral value, for example, if the user input "1234", your program will output 10.