Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You should not change the function signature. You should not reassign the first parameter. You should not reassign the last parameter. No properties should be

image text in transcribed
  • You should not change the function signature.

  • You should not reassign the first parameter.

  • You should not reassign the last parameter.

  • No properties should be added. Object.keys(Person).length should always return 6.

  • You should be able to instantiate your Person object.

  • Your Person object should not have a firstName property.

  • Your Person object should not have a lastName property.

  • The .getFirstName() method should return the string Bob.

  • The .getLastName() should return the string Ross.

  • The .getFullName() method should return the string Bob Ross.

  • The .getFullName() method should return the string Haskell Ross after calling .setFirstName('Haskell').

  • The .getFullName() method should return the string Bob Curry after calling .setLastName('Curry').

  • The .getFullName() method should return the string Haskell Curry after calling .setFullName('Haskell', 'Curry').

  • The .getFirstName() method should return the string Haskell after calling .setFullName('Haskell', 'Curry').

  • The .getLastName() method should return the string Curry after calling .setFullName('Haskell', 'Curry').

  • The .getFullName() method should return the string Emily Martinez de la Rosa after calling .setFullName('Emily Martinez', 'de la Rosa').

  • The .getFirstName() property should return the string Emily Martinez after calling .setFullName('Emily Martinez', 'de la Rosa').

  • The .getLastName() property should return the string de la Rosa after calling .setFullName('Emily Martinez', 'de la Rosa').


Make a Derson Fill in the object constructor with the following methods belowi getfirstiame() gettasthime() qetFuliname() setfirsthane (first) sethastiame (last) setfullname(first, last) Run the tests to see the expected output for each method. These methods must be the only available means of interacting with the object. Each test will declare a new ingtance as const Person = function (f test, last) 1 this.getfutivane = function( ) \{ return ; r; return S

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions