Pre-Summer Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmasmnth

You write the following JavaScript code.

You write the following JavaScript code. Line numbers are included for reference only.

01 < script >

02

03 beststudent = new Student( " David " , " Hamilton " );

04 document.write(beststudent.fullname + " is registered. " );

05 < /script >

You need to write a function that will initialize and encapsulate the member variable fullname.

Which code fragment could you insert at line 02 to achieve this goal?

Note: Each correct answer presents a complete solution.

A.

function Student(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; this.fullname = this.firstname + " " + this.lastname;}

B.

var student(firstName, lastName) { firstname = firstName; lastname = lastName; fullname = firstname + " " + lastname;}

C.

var Student(firstname, lastname) { this.firstname = firstname; this.lastname = lastname; this.fullname = this.firstname + " " + this.lastname;}

D.

function Student(firstName, lastName) { firstname = firstName; lastname = lastName; fullname = firstname + " " + lastname;}

IT Specialist INF-306 Summary

  • Vendor: IT Specialist
  • Product: INF-306
  • Update on: May 20, 2026
  • Questions: 68
Price: $52.5  $149.99
Buy Now INF-306 PDF + Testing Engine Pack

Payments We Accept

Your purchase with ExamsVCE is safe and fast. Your products will be available for immediate download after your payment has been received.
The ExamsVCE website is protected by 256-bit SSL from McAfee, the leader in online security.

examsvce payment method