
180-191
Authored by Нурдаулет Койшыбаев
Philosophy
12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
```javascript
let num = 10;
console.log(num++);
```
10 \
11 \
9 \
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the `Array.prototype.push()` method in JavaScript?
Removes the first element from an array
Adds one or more elements to the end of an array
Reverses the order of the elements in an array
Sorts the elements of an array
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid way to declare a JavaScript function?
`function myFunction() {}`
`const myFunction = function() {}`
`let myFunction = () => {}`
`var myFunction = () => {}`
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code snippet do?
```javascript
const person = {
name: 'John',
age: 30,
greet() {
console.log(`Hello, my name is ${this.name} and I'm ${this.age} years old.`);
}
};
person.greet();
```
Declares a function named `greet`
Logs "Hello, my name is John and I'm 30 years old." to the console
c) Defines an array named `person`
Throws an error
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the `Array.prototype.filter()` method do in JavaScript?
Modifies the original array
Creates a new array with elements that pass a test specified by a function
Removes elements from an array
Adds elements to an array
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
```javascript
const array = [1, 2, 3, 4, 5];
const doubledArray = array.map(item => item * 2);
console.log(doubledArray);
[2, 4, 6, 8, 10]
[1, 2, 3, 4, 5]
[1, 4, 9, 16, 25]
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the `Object.keys()` method return in JavaScript?
An array of a given object's property names
The number of properties in an object
An array of a given object's property values
The prototype of an object
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?