You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
276 B
19 lines
276 B
function formatName(user) {
|
|
return (
|
|
user.firstName + ' ' + user.lastName
|
|
);
|
|
}
|
|
|
|
const user = {
|
|
firstName: 'Harper',
|
|
lastName: 'Perez',
|
|
};
|
|
|
|
const element = (
|
|
<h1>Hello, {formatName(user)}!</h1>
|
|
);
|
|
|
|
ReactDOM.render(
|
|
element,
|
|
document.getElementById('root')
|
|
);
|
|
|