Quiz · Interfaces and structural typing · lesson 4 of 12Quiz — | and &How does a union A | B differ from an intersection A & B?[A]| and & here are operators that run with the program: A | B merges two objects into a new one, and A & B checks which of the two types a value matches and keeps only that one.[B]A value of A | B is one of the two types, so until you narrow it only the members both types share are usable. A value of A & B is both types at once: it has every member of A and every member of B.[C]For object types the two mean the same: a value of A | B and a value of A & B must both carry every member of A and of B. They differ only for primitive types, such as string | number against string & number.[D]A value of A | B has every member of both types, because it may have come from either one. A value of A & B keeps only the members the two types share, since only those suit both of them.← BackExtending and intersectingNext →Structural typing