Back to Freecodecamp

Step 2

curriculum/challenges/english/blocks/workshop-library-manager/67116d7584d0b469b14579bf.md

latest1.7 KB
Original Source

--description--

Inside the library array, create an object with the following properties and values:

PropertyValue
title"Your Next Five Moves: Master the Art of Business Strategy"
author"Patrick Bet-David and Greg Dinkin"
about"A book on how to plan ahead"
pages320

--hints--

You should have an object inside the library array.

js
assert.isObject(library[0])

Your object should have a title property.

js
assert.property(library[0], "title")

The value of your title property should be "Your Next Five Moves: Master the Art of Business Strategy".

js
assert.propertyVal(library[0], "title", "Your Next Five Moves: Master the Art of Business Strategy");

Your object should have an author property.

js
assert.property(library[0], "author")

Your author property should have the value "Patrick Bet-David and Greg Dinkin".

js
assert.propertyVal(library[0], "author", "Patrick Bet-David and Greg Dinkin");

Your object should have an about property.

js
assert.property(library[0], "about")

Your about property should have the value "A book on how to plan ahead".

js
assert.propertyVal(library[0], "about", "A book on how to plan ahead");

Your object should have a pages property.

js
assert.property(library[0], "pages")

The value of your pages property should be a number.

js
assert.isNumber(library[0]?.pages)

Your pages property should be set to 320.

js
assert.propertyVal(library[0], "pages", 320);

--seed--

--seed-contents--

js
const library = [
--fcc-editable-region--
  
--fcc-editable-region--
];