1. What is Type narrowing ? Mid A. narrowing a value to a class type using the instanceof operator B. a union of object types sharing a literal tag property that the compiler uses to narrow between them C. narrowing by checking whether a given property key exists on an object D. refining a broader type to a more specific one within a particular code branch Reveal the answer + AI explanation — free account
2. Which term means: "refining a broader type to a more specific one within a particular code branch"? Mid A. Type narrowing B. in operator guard C. User-defined type guard D. Discriminated union Reveal the answer + AI explanation — free account
3. Which statement is correct? Mid A. Type narrowing — narrowing a union by checking a value's primitive type with typeof B. Type narrowing — a union of object types sharing a literal tag property that the compiler uses to narrow between them C. Type narrowing — narrowing by checking whether a given property key exists on an object D. Type narrowing — refining a broader type to a more specific one within a particular code branch Reveal the answer + AI explanation — free account
4. What is typeof guard ? Junior A. narrowing by checking whether a given property key exists on an object B. narrowing a value to a class type using the instanceof operator C. a union of object types sharing a literal tag property that the compiler uses to narrow between them D. narrowing a union by checking a value's primitive type with typeof Reveal the answer + AI explanation — free account
5. Which term means: "narrowing a union by checking a value's primitive type with typeof"? Junior A. instanceof guard B. typeof guard C. in operator guard D. Type narrowing Reveal the answer + AI explanation — free account
6. Which statement is correct? Junior A. typeof guard — refining a broader type to a more specific one within a particular code branch B. typeof guard — narrowing a union by checking a value's primitive type with typeof C. typeof guard — narrowing a value to a class type using the instanceof operator D. typeof guard — a union of object types sharing a literal tag property that the compiler uses to narrow between them Reveal the answer + AI explanation — free account
7. What is instanceof guard ? Mid A. refining a broader type to a more specific one within a particular code branch B. narrowing a value to a class type using the instanceof operator C. narrowing a union by checking a value's primitive type with typeof D. a function whose return type is arg is T, telling the compiler the argument is a specific type Reveal the answer + AI explanation — free account
8. Which term means: "narrowing a value to a class type using the instanceof operator"? Mid A. typeof guard B. Type narrowing C. instanceof guard D. Discriminated union Reveal the answer + AI explanation — free account
9. Which statement is correct? Mid A. instanceof guard — a union of object types sharing a literal tag property that the compiler uses to narrow between them B. instanceof guard — a function whose return type is arg is T, telling the compiler the argument is a specific type C. instanceof guard — narrowing a value to a class type using the instanceof operator D. instanceof guard — narrowing a union by checking a value's primitive type with typeof Reveal the answer + AI explanation — free account
10. What is in operator guard ? Mid A. narrowing a union by checking a value's primitive type with typeof B. narrowing a value to a class type using the instanceof operator C. a function whose return type is arg is T, telling the compiler the argument is a specific type D. narrowing by checking whether a given property key exists on an object Reveal the answer + AI explanation — free account
11. Which term means: "narrowing by checking whether a given property key exists on an object"? Mid A. instanceof guard B. in operator guard C. typeof guard D. User-defined type guard Reveal the answer + AI explanation — free account
12. Which statement is correct? Mid A. in operator guard — narrowing a union by checking a value's primitive type with typeof B. in operator guard — narrowing by checking whether a given property key exists on an object C. in operator guard — refining a broader type to a more specific one within a particular code branch D. in operator guard — narrowing a value to a class type using the instanceof operator Reveal the answer + AI explanation — free account
13. What is Discriminated union ? Senior A. a function whose return type is arg is T, telling the compiler the argument is a specific type B. narrowing a value to a class type using the instanceof operator C. a union of object types sharing a literal tag property that the compiler uses to narrow between them D. narrowing a union by checking a value's primitive type with typeof Reveal the answer + AI explanation — free account
14. Which term means: "a union of object types sharing a literal tag property that the compiler uses to narrow between them"? Senior A. instanceof guard B. in operator guard C. User-defined type guard D. Discriminated union Reveal the answer + AI explanation — free account
15. Which statement is correct? Senior A. Discriminated union — a union of object types sharing a literal tag property that the compiler uses to narrow between them B. Discriminated union — refining a broader type to a more specific one within a particular code branch C. Discriminated union — a function whose return type is arg is T, telling the compiler the argument is a specific type D. Discriminated union — narrowing a value to a class type using the instanceof operator Reveal the answer + AI explanation — free account
16. What is User-defined type guard ? Senior A. a union of object types sharing a literal tag property that the compiler uses to narrow between them B. narrowing a union by checking a value's primitive type with typeof C. a function whose return type is arg is T, telling the compiler the argument is a specific type D. narrowing a value to a class type using the instanceof operator Reveal the answer + AI explanation — free account
17. Which term means: "a function whose return type is arg is T, telling the compiler the argument is a specific type"? Senior A. instanceof guard B. Discriminated union C. in operator guard D. User-defined type guard Reveal the answer + AI explanation — free account
18. Which statement is correct? Senior A. User-defined type guard — narrowing a union by checking a value's primitive type with typeof B. User-defined type guard — a function whose return type is arg is T, telling the compiler the argument is a specific type C. User-defined type guard — a union of object types sharing a literal tag property that the compiler uses to narrow between them D. User-defined type guard — narrowing a value to a class type using the instanceof operator Reveal the answer + AI explanation — free account