Search Header Logo

Test Your JavaScript Fundamental (Part 1)

Authored by Haka MD

Computers

University

Used 20+ times

Test Your JavaScript Fundamental (Part 1)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

let yy = 10;

console.log(++yy);

console.log(yy++);

console.log(yy);

11
12

10

11

12

12

11

12

13

11
11
12

2.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

let aa = "10";

console.log(aa++);

console.log(++aa);

console.log(aa);

10

12

12

11

12

10

11

11

10

undefined

3.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

let s = [1, 9, 7, 100, 2, 99, 88, 20];

s.splice(2, 4, 91, 92, 93);

console.log(s);

[1, 9, 91, 92, 93, 88, 20]

[1, 91, 92, 93, 99, 88, 20 ]

[1, 9, 7, 20, 91, 92, 93]

[1, 9, 7, 91, 92 , 93, 20]

4.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

const arrs = [1, 2, 3];

const { log } = console;

log(arrs.push(4));

[1, 2, 3, 4]

error

4

[1, 2 , 3]

5.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

console.log(0.2 + 0.3 === 0.5);

true

false

error

NaN

6.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

const arrHewan = ["ayam", `berang"`, "kambing"];

for (let i = 0; i < arrHewan.length; i++) {

console.log(arrHewan[i]);

}

ayam
berang"

kambing

kambing

error

undefined

7.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt


let multiply = (a, b) => a * b;

let square = (n) => multiply(n, n);

let printSquare = (n) => {

let squared = square(n);

console.log(square(n));

console.log(squared);

};

printSquare(5);

25
25

undefined
25

25
undefined

error

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?