scrimba
Frontend Career Path
Essential JavaScript concepts
JS Mini Projects
Super Challenge Set-up
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

AboutCommentsNotes
Super Challenge Set-up
Expand for more info
index.js
run
preview
console
function getPropertyHtml() {
/*
SUPER CHALLENGE 💪

Render out a card for each of the properties in the propertyForSaleArr array (in the 'properties' folder). Each card should have an image, a property location, a price, a comment and the TOTAL property size in square metres (each object has an array with the size in square metres of the individual rooms).

If no array of properties is passed to getPropertyHtml, the placeholder property stored in placeholderPropertyObj (in the 'properties' folder) should be rendered instead.

This is the JS I want you to use to complete this challenge 👇
- import/export
- .map()
- .join()
- Object destructuring
- .reduce()
- Default parameters

The HTML and CSS have been done for you.
This is the HTML template 👇. Replace everything in UPPERCASE with property data.

<section class="card">
<img src="/images/IMAGE">
<div class="card-right">
<h2>PROPERTY LOCATION</h2>
<h3>PRICE GBP</h3>
<p>COMMENT</p>
<h3>TOTAL SIZE IN SQUARE METRES m&sup2;</h3>
</div>
</section>
*/
}

/***** Modify 👇 by adding an argument to the function call ONLY. *****/
document.getElementById('container').innerHTML = getPropertyHtml()
Console
/index.html
-3:21