Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 715 Bytes

File metadata and controls

31 lines (23 loc) · 715 Bytes
tutorial

01.2 Rendering from objects

Now lets use a more complex variable to render our HTML, let's say we have the following JS Object containing a customer information:

const customer = {
    first_name: 'Bob',
    last_name: 'Dylan'
};

To retrieve any property from the Customer object we have to use the dot (.) operator, like this:

console.log(customer.first_name); // will print "Bob" on the console.

📝 Instructions:

Open the app.jsx and create the necesary code to make your file render the following output into the DOM:

<div>
    <h1>My name is Bob</h1>
    <h2>My last name is Dylan</h2>
</div>