JS Coding Questions Logo
JS Coding Questions
#34🎯 Exercise💻 Code

JavaScript Coding Exercise 34

Advertisement

728x90
javascript
1class A {
2
3constructor() {
4
5console.log(new.target.name);
6}
7}
8
9class B extends A {
10
11constructor() {
12
13super();
14}
15}
16
17new A();
18
19new B();

Choose the correct output:

A
A, A
B
A, B

Advertisement

Responsive Ad
33of86