Quiz · Classes · lesson 12 of 12Quiz — implements and extendsHow does implementing an interface differ from extending a class?[A]A class may list several base classes after extends but only one interface after implements. The interface brings the bodies of its methods along, so implements is how classes share their code, while extends only records a link for tsc to check.[B]implements copies the interface's members into the class, and a member you leave out gets a default value in the JavaScript. extends does the same for a base class, and both take only one name per class, so an interface is a lighter base class.[C]Both are links kept at run time: implements stores the interface in the JavaScript so that instanceof Printable works, and a member you forget to write fails only when the program first calls it, and never at compile time.[D]extends gives the class the base class's fields and methods, and there is only one base. implements gives nothing: tsc only checks that the class has the interface's members, the JavaScript keeps no trace of it, and a class may list many interfaces.← Backabstract and implementsNext module →11 · Generics