คำแทนคำว่า If (เช่น Unless, Provided That, As Long As, In Case)

คำแทนคำว่า If (เช่น Unless, Provided That, As Long As, In Case) — Bài Tập 2

/ 10

คำแทนคำว่า If (เช่น Unless, Provided That, As Long As, In Case) — Bài Tập 2

Luyện tập ngữ pháp tiếng Anh chủ đề คำแทนคำว่า If (เช่น Unless, Provided That, As Long As, In Case) qua 10 câu hỏi trắc nghiệm. Trả lời đúng ít nhất 70% để hoàn thành bài.

คำเชื่อมเงื่อนไขอื่นๆ ได้แก่ unless (ถ้าไม่), provided that, as long as (ในกรณีที่เท่านั้น), in case (เพื่อเป็นการป้องกัน)

B2 · ระดับกลางตอนสูง (Upper Intermediate) TOEIC 605–780 IELTS 5.5–6.5 อนุประโยคและประโยคเงื่อนไข (Clauses & Conditionals)
10 câu hỏi Điểm qua: 70% Bài 2

Hướng dẫn làm bài

  • Đọc kỹ từng câu hỏi và chọn đáp án đúng nhất.
  • Bài thi không giới hạn thời gian — bạn có thể làm theo tốc độ của mình.
  • Nhấn Nộp bài khi đã hoàn thành để xem kết quả và giải thích chi tiết.

เข้าสู่ระบบเพื่อบันทึกผล

คุณสามารถทำแบบทดสอบได้โดยไม่ต้องเข้าสู่ระบบ แต่จะไม่มีการบันทึกผล เข้าสู่ระบบ เพื่อติดตามความก้าวหน้าของคุณ

  1. 1

    Which of the following is NOT a keyword typically associated with a `switch` statement?

  2. 2

    In JavaScript, if you have `const user = null; const username = user?.name ?? 'Guest';`, what will `username` be?

  3. 3

    A function `processInput(data)` should immediately stop and return an error if `data` is null. Which alternative to `if-else` is best for this?

  4. 4

    To manage different actions based on user input (e.g., 'add', 'edit', 'delete'), you store functions in a dictionary/map where keys are the input strings and values are the corresponding functions. What is this technique called?

  5. 5

    Which operator provides a concise way to write conditional expressions, often replacing simple if-else statements?

  6. 6

    To provide a default empty object for a variable `options` if it's null or undefined, which operator is most suitable?

  7. 7

    You are building a system that needs to retrieve configuration values (e.g., `API_KEY`, `DATABASE_URL`) from environment variables. If an environment variable is not set, you want to use a default value. Which operator is ideal for this, especially if an empty string is a valid configuration?

  8. 8

    You are building a GUI application where various menu items (e.g., 'Save', 'Open', 'Copy') need to perform different actions when clicked. Instead of using a large `if-else if` block to check which item was clicked and then execute its logic, you encapsulate each action into a separate object. Which design pattern does this describe?

  9. 9

    Which of the following is a common use case for the ternary operator?

  10. 10

    You want to log a message only if a `debugMode` flag is true. Which short-circuiting operator can achieve this concisely?

← กลับไปหัวข้อ