JS Tutorial Thiết kế calculator online - html5/css & Javascript Thiết kế calculator online - html5/css & Javascript BÀI TRẮC NGHIỆM ĐÁNH GIÁ [Trắc Nghiệm] Ôn tập kiến thức javascript & luyện thi & phỏng vấn Bộ đề kiểm tra: [Trắc Nghiệm] Ôn tập kiến thức javascript & luyện thi & phỏng vấn (40 câu). ⏱️ 20 phút 🎯 Điểm đạt: 80% 📝 40 câu Làm bài toàn màn hình Câu 1: Which keyword is used to declare a block-scoped variable in JavaScript? var let const static Câu 2: Which keyword declares a constant that cannot be reassigned? var let const final Câu 3: Which operator compares both value and data type? == = === != Câu 4: What is the result of the expression: 5 + '5'? 10 55 NaN Error Câu 5: Which operator is used to get the remainder of a division? / % // mod Câu 6: What is the boolean value of the expression: !true? true false undefined Câu 7: Which statement is used to execute code when a condition is true? for while if switch Câu 8: Which block runs when the if condition is false? then default catch else Câu 9: Which structure is suitable when there are multiple branches based on specific values? if else if switch for Câu 10: Which keyword is used to exit a case in a switch statement? exit stop break return Câu 11: Which keyword marks the default block in a switch statement? else default finally otherwise Câu 12: Which loop runs while a condition remains true? for foreach loop repeat Câu 13: How many main parts are in the for loop syntax? 2 3 4 5 Câu 14: Which loop checks the condition before executing the code block? do...while forEach while map Câu 15: Which loop executes at least once even if the condition is false? while for loop do...while Câu 16: Which keyword skips the current iteration and continues the loop? skip continue pass next Câu 17: Which keyword completely exits a loop? exit break stop return Câu 18: What is the index of the first element in an array? 1 -1 0 Câu 19: How do you access the second element of an array named arr? arr(2) arr[2] arr[1] arr.second Câu 20: Which property returns the number of elements in an array? size count length index Câu 21: Which method adds an element to the end of an array? push() pop() shift() unshift() Câu 22: Which method removes the last element of an array? push() pop() slice() concat() Câu 23: Which method adds an element to the beginning of an array? push() append() unshift() insert() Câu 24: Which method removes the first element of an array? shift() pop() remove() delete() Câu 25: Which keyword is used to declare a function in JavaScript? func def function method Câu 26: How do you declare a function named sum? function = sum() create sum() function sum() def sum() Câu 27: Where are function parameters placed? In square brackets [] In parentheses () In curly braces {} After the return keyword Câu 28: Which keyword specifies the return value of a function? result yield return output Câu 29: If a function has no return statement, what is the default return value? 0 false undefined Câu 30: How can a function be called? functionName[] functionName{} functionName() call functionName Câu 31: Who developed the first version of JavaScript at Netscape in 1995? James Gosling Brendan Eich Tim Berners-Lee Guido van Rossum Câu 32: Which edition of ECMAScript introduced 'strict mode' and JSON support? ECMAScript 3 ECMAScript 2015 ECMAScript 5 ECMAScript 6 Câu 33: Where is Client-side JavaScript (CSJS) executed? On the Web server In the database engine On a remote cloud proxy In the browser on the user's workstation Câu 34: What is the process of converting server-side JavaScript code into machine-independent bytecode called? Interpretation Compilation Encryption Serialization Câu 35: Which HTML tag is used to define a script to make pages interactive? <javascript> <code> <script> <style> Câu 36: In JavaScript, which keyword is used to create a variable by allocating memory to it? var dim set new Câu 37: Which primitive data type in JavaScript contains only two values: true or false? number string boolean Câu 38: What does a 'null' value in a variable specify? The variable has the value zero The variable has no value The variable contains an empty string The variable is undefined Câu 39: Which of the following is classified as a composite data type in JavaScript? String Number Arrays Boolean Câu 40: Which method of the document object displays data and appends a new line character? write() writeln() print() alert() 🚀 Nộp Bài & Xem Điểm 🔄 Làm Lại