REVIEWER IN JAVA SCRIPT
1. A conditional if–else statement checks whether a condition is true and performs a different
action when the
condition is false.
2. An if statement is used when you want to select one block of code from many possible blocks
to execute.
3. A for loop repeatedly executes a block of code a specific number of times.
4. A for loop is used when you already know how many times a block of code should be iterated.
5. A for loop executes a block of code a specified number of times.
6. An alert is commonly used to ensure the user receives a message such as a warning or a
greeting.
7. A return statement sends a value back from a function.
8. The break statement stops a loop once a specific condition becomes true and then continues
with the next
code after the loop.
9. A continue statement stops the current loop iteration for a specific value and proceeds with
the next iteration.
10. User input is often used to allow the user to enter a value before accessing a page.
11. An if–else statement allows a program to execute one block of code when a condition is met
and another
block when it is not.
12. An if statement is used to choose one block of code to execute from multiple possible
options.
13. An if statement specifies a block of code that will be executed only when a particular
condition is true.
14. In a confirm dialog box, clicking “OK” returns true, while clicking “Cancel” returns false.
15. Popup boxes are windows that appear or pop out on the user’s screen.
16. JavaScript is the most popular and widely used scripting language on the internet and works
across all
major browsers.17. JavaScript code is placed inside the <script> HTML element.
17. Brendan Eich is the developer who created JavaScript.
18. JavaScript can be used to create cookies for storing data in a browser.
19. JavaScript can validate data, such as form inputs entered by users.
20. JavaScript can enhance a web page by adding interactivity and dynamic content.
21. JavaScript code can be created using a text editor such as Notepad.
22. JavaScript can react to an event, such as a button click or mouse movement.
23. When used in a web page, JavaScript runs in the browser.
24. The correct file extension for saving JavaScript code is .html
25. Comparison operators are used to evaluate the equality or difference between variables or
values.
26. Comparison operators are used to determine the logic between expressions, variables, or
values.
27. To create a string, text must be placed inside quotation marks.
28. The backslash ( \ ) is an escape character used in JavaScript.
29. Variables provide temporary storage for values and expressions.
30. Any variable that represents text is classified as a string data type.
31. String literals are text enclosed in pairs of quotation marks.
32. The operator used in division is /.
33. To apply multiplication, the symbol * is needed.
34. The operator used for addition is +.
35. The operator used for subtraction is –.
36. For modulus operations, the % operator is needed.
37. A for loop is used when you know how many times a block of code must be iterated.
38. A while loop is used when you know when the condition will be met.
39. A function can be executed inside a web page as many times as needed.
40. The windows that pop out of your screen are called popup boxes.
41. An alert is usually used to make sure that the user reads your message, such as a warning or
a greeting.
42. The name given to JavaScript before was Live Script.
43. JavaScript is considered as client-side.
44. JavaScript has dynamic typing.
45. JavaScript can run locally in an HTML file.
46. Some browsers do not support JavaScript.
47. Variables are case-sensitive, meaning an uppercase variable such as “X” is different from a
lowercase
variable “x”.
48. Variable names must begin with a letter or an underscore (_).
49. The types of values that a program can work with in JavaScript are called data types.
50. The Boolean data type accepts the values true or false.
51. An assignment operator is used to assign values to JavaScript variables.
52. The output of the given code is 50100, because the values are treated as strings and are
concatenated.
53. The break statement stops the loop and continues executing the code that follows after the
loop.
54. The continue statement breaks the current loop iteration and continues with the next value.
55. An if…else statement is used to execute a block of code based on a condition or perform
another action if
condition is not met.
56. An if statement is used to specify a block of code that will be executed if a specified
condition is true.
57. The for…in loops through the elements of an array or the properties of an object.
58. A function is a block of code that can be reused over and over again.
59. To define a JavaScript function, use the function keyword followed by a name, followed by a
set of
parentheses ( ).
60. A return statement sends a value back from a function.