ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 58 - Certified JavaScript Developer I discussion

Report
Export

Refer to the code below:

Refer to the code below:

Function Person(firstName, lastName, eyecolor) {

this.firstName =firstName;

this.lastName = lastName;

this.eyeColor = eyeColor;

}

Person.job = 'Developer';

const myFather = new Person('John', 'Doe');

console.log(myFather.job);

What is the output after the code executes?

A.
ReferenceError: eyeColor is not defined
Answers
A.
ReferenceError: eyeColor is not defined
B.
ReferenceError: assignment to undeclared variable "Person"
Answers
B.
ReferenceError: assignment to undeclared variable "Person"
C.
Developer
Answers
C.
Developer
D.
Undefined
Answers
D.
Undefined
Suggested answer: D
asked 23/09/2024
Andrea Ciovati
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first