Worksheetsjs Quiz
Total questions: 40
Worksheet time: 7mins
Question: Do you know what will be the output of this code?
Sual: Bu kodun nəticəsinin nə olacağını bilirsinizmi?
console.log(typeof typeof 1 );
String
number
1
true
Question: Do you know what will be the output of this code?
let array=[1,2,3];
array[6]=9;
console.log(array[5]);
Sual: Bu kodun nəticəsinin nə olacağını bilirsin
undefined
1
2
9
Question: Can you guess what will be the output of the code below?
console.log(typeof NaN);
Sual: Aşağıdakı kodun nəticəsinin nə olacağını təxmin edə bilərsinizmi?
NaN
number
null
undefined
Question: Do you know what will be the output of this code?
console.log(false=='0');
Bu kodun nəticəsinin nə olacağını bilirsinizmi?
false
true
Question: Do you know what will be the output of this code?
console.log("This is a string." instanceof String);
Bu kodun nəticəsinin nə olacağını bilirsinizmi
true
false
Question: Do you know what will be the output of this code?
const numbers = [33, 2, 8];
numbers.sort();
console.log(numbers[1])
Bu kodun nəticəsinin nə olacağını bilirsinizmi?
33
2
8
1
If you type the following code in the console window, what result will you get?
3 > 2 > 1 === false;
Konsol pəncərəsində aşağıdakı kodu yazsanız, hansı nəticəni əldə edəcəksiniz?
true
false
JavaScript is a ___ -side programming language.
JavaScript ___ tərəfli proqramlaşdırma dilidir.
Client
Server
Both
None
Which of the following will write the message “Hello DataFlair!” in an alert box?
Aşağıdakılardan hansı “Salam DataFlair!” mesajını yazacaq. xəbərdarlıq qutusunda?
alertBox("Hello DataFlair!");
alert(Hello DataFlair!);
alert("Hello DataFlair!");
alert("Hello DataFlair!);
How do you find the minimum of x and y using JavaScript?
JavaScript-dən istifadə edərək minimum x və y-ni necə tapırsınız?
min(x,y);
Math.min(x,y)
Math.min(xy)
min(xy);
Which of the following statements will throw an error?
Please select 2 correct answers
Aşağıdakı ifadələrdən hansı xətaya səbəb olacaq?
Zəhmət olmasa 2 düzgün cavab seçin
var fun = function bar( ){ }
var fun = function bar{ }
function fun( ){ }
If the value of x is 40, then what is the output of the following program?
(x % 10 == 0)? console.log(“Divisible by 10”) : console.log(“Not divisible by 10”);
Əgər x-in qiyməti 40-dırsa, onda aşağıdakı proqramın nəticəsi nədir?
(x % 10 == 0)? console.log("10-a bölünür") : console.log("10-a bölünmür");
ReferenceError
Divisible by 10
Not divisible by 10
None of the above
Which JavaScript label catches all the values, except for the ones specified?
Hansı JavaScript etiketi göstərilənlərdən başqa bütün dəyərləri tutur?
catch
label
Try
default
Which are the correct “if” statements to execute certain code if “x” is equal to 2?
Əgər “x” 2-yə bərabərdirsə, müəyyən kodu yerinə yetirmək üçün düzgün “if” ifadələri hansılardır?
if(x 2)
if(x = 2)
f(x == 2)
if(x != 2 )
What will the code return?
Boolean(3 < 7)
Kod nə qaytaracaq?
Boolean (3 < 7)
true
false
NaN
SyntaxError
What is the output of the following code in the console?
Konsolda aşağıdakı kodun çıxışı nədir?
var x = 0;
function fun(){
++x;
this.x = x;
return x;
}
var bar = new new fun;
console.log(bar.x);
ReferenceError
undefined
1
TypeError
Which is the correct JavaScript syntax to change the HTML content given below?
<p id=”test”>Hello World!</p>
Aşağıda verilmiş HTML məzmununu dəyişdirmək üçün düzgün JavaScript sintaksisi hansıdır?
document.getElementById(“test”).innerHTML = “Hello DataFlair!”;
document.getElementsById(“test”).innerHTML = “Hello DataFlair!”;
document.getElementById(test).innerHTML = “Hello DataFlair!”;
document.getElementByTagName(“p”)[0].innerHTML = “Hello DataFlair!”;
Are “==” and “===” operators different in JavaScript?
JavaScript-də “==” və “===” operatorları fərqlidirmi?
(a)
A Function Associated With An object is Called:
Obyektlə əlaqəli funksiya necə adlanır:
Function
Method
Link
None
JavaScript is ECMAScript
True
False
Which of the following is not a primitive data type in JavaScript?
Aşağıdakılardan hansı JavaScript-də primitiv məlumat növü deyil?
Number
String
Boolean
Object
What does the “typeof” operator do in JavaScript?
“typeof” operatoru JavaScript-də nə edir?
Returns the data type of a variable
Checks if a variable is defined
Assigns a value to a variable
Concatenates two strings
console.log(2 + “2”);
“4”
“22”
4
22
Which of the following is not a comparison operator in JavaScript?
Aşağıdakılardan hansı JavaScript-də müqayisə operatoru deyil?
==
===
!=
=<
var x = 5;
var y = “5”;
console.log(x == y);
true
false
undefined
Error
var x = [1, 2, 3];
console.log(x.length);
1
2
3
4
console.log(2 ** 3);
5
6
8
9
What is the correct syntax for a “for” loop in JavaScript?
JavaScript-də “for” döngəsi üçün düzgün sintaksis nədir?
for (var i = 0; i < 5; i++)
for (i = 0; i < 5; i++)
for (var i = 5; i > 0; i–)
for (i = 5; i > 0; i–)
What is the output of the following code:
console.log(Math.random());
Aşağıdakı kodun çıxışı nədir
0
0.2
1
A random number between 0 and 1
What is the output of the following code:
console.log(“Hello”.charAt(1));
Aşağıdakı kodun çıxışı nədir: console.log(“Salam”.charAt(1));
"H"
“e”
“l”
“o”
What is the output of the following code:
var x = [1, 2, 3];
x.push(4);
console.log(x)
Aşağıdakı kodun çıxışı nədir
[1, 2, 3]
[2, 3, 4]
[1, 2, 3, 4]
Error
What is the output of the following code:
Aşağıdakı kodun çıxışı nədir
var x = 5;
var y = 3;
console.log(x *= y);
8
15
12
25
What is the output of the following code:
Aşağıdakı kodun çıxışı nədir:
var x = [1, 2, 3];
console.log(x.slice(1));
[1, 2]
[2, 3]
[1, 2, 3]
Error
What is the output of the following code:
Aşağıdakı kodun çıxışı nədir
console.log(typeof []);
“array”
“object”
“null”
“undefined”
Which of the following methods removes the last element from an array and returns that element?
Aşağıdakı üsullardan hansı massivdən sonuncu elementi çıxarır və həmin elementi qaytarır?
push()
pop()
shift()
unshift()
Which built-in method returns the string representation of the number's value?
Hansı daxili metod nömrənin dəyərinin sətir təsvirini qaytarır?
toValue()
toNumber()
toString()
None of the above.
Which of the following function of String object returns the characters in a string between two indexes into the string?
String obyektinin aşağıdakı funksiyalarından hansı iki indeks arasındakı sətirdəki simvolları sətirə qaytarır?
slice()
split()
substr()
substring()
How do you write a comment in JavaScript?
JavaScript-də şərhi necə yazırsınız?
var name;
variable = name;
variable name;
v name;
console.log('10' + 20);
1020
30
102010
NaN
What is the correct way to write an if statement in JavaScript?
JavaScript-də if ifadəsini yazmağın düzgün yolu nədir?
if (x === 5) {
console.log('x is equal to 5');
if x === 5 {
console.log('x is equal to 5');
if x = 5 {
console.log('x is equal to 5');
if x == 5 {
console.log('x is equal to 5');
