Manakah output yang tepat dari kode berikut?
let myVariable = 12;
myVariable = 30;
myVariable = 5;
console.log(myVariable);
ASESMEN SUMATIF JAVASCRIPT
Quiz
•
Computers
•
9th - 12th Grade
•
Medium
sandatya sandatya
Used 13+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Manakah output yang tepat dari kode berikut?
let myVariable = 12;
myVariable = 30;
myVariable = 5;
console.log(myVariable);
12
30
5
error
2.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Perhatikan kode berikut:
const stock = 0;
const milkNeeded = 25;
if (stock > milkNeeded) {
stock = stock - milkNeeded;
console.log('Processing your order...');
} else {
console.log('Out of Stock!');
}
console.log('Thank you');
Out of Stock!
Thank you
Processing your order...
Thank you
Out of Stock!
Processing your order...
3.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Perhatikan potongan kode berikut:
const capital = {
"Jakarta": "Indonesia",
"London": "England",
"Tokyo": "Japan"
}
capital["New Delhi"] = "Indonesia";
console.log(capital["Indonesia"]);
Ketika kode di atas dijalankan, maka outputnya adalah...
Jakarta
India
undefined
Error
4.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Diberikan sejumlah elemen yang harus disimpan secara berurutan. Manakah struktur data yang akan Anda gunakan?
Map
Object
Array
Set
5.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Perhatikan kode berikut:
function calculate(value) {
return value < 2 ? value : (calculate(value - 1) + calculate(value - 2));
}
console.log(calculate(3));
Jika kode di atas dijalankan, maka manakah hasilnya?
1
2
3
4
10 questions
2° ANO SENAC - ATIVIDADE 3
Quiz
•
11th Grade
10 questions
AP CSP code.org Unit 3 2020
Quiz
•
9th - 12th Grade
10 questions
Evaluasi dan Refleksi - 4
Quiz
•
12th Grade
10 questions
Evaluasi Javascript 1
Quiz
•
10th Grade
10 questions
ATIVIDADE 4 2° ANO SENAC
Quiz
•
11th Grade
10 questions
Axios in Vue 3
Quiz
•
12th Grade - University
10 questions
Introducción Arreglos JS II
Quiz
•
10th Grade
10 questions
Basics of Javascript
Quiz
•
9th - 12th Grade
20 questions
math review
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
10 questions
Human Body Systems and Functions
Interactive video
•
6th - 8th Grade
19 questions
Math Review
Quiz
•
3rd Grade
45 questions
7th Grade Math EOG Review
Quiz
•
7th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
20 questions
Investing
Quiz
•
9th - 12th Grade
20 questions
EOC Math 1 Review
Quiz
•
9th Grade
20 questions
Insurance
Quiz
•
9th - 12th Grade
20 questions
MCAS Biology Review
Quiz
•
9th - 10th Grade
20 questions
Paying for College
Quiz
•
9th - 12th Grade
20 questions
Math 1 EOC Review
Quiz
•
9th Grade