Skip to content

Instantly share code, notes, and snippets.

@desoga10 desoga10/script.js

Last active Jun 8, 2019
Embed
What would you like to do?
// Display result in HTML
const outputHtml = fits => {
if (fits.length > 0) {
const html = fits
.map(
fit => `
<div class="row">
<div class="col s12">
<div class="card grey darken-4 darken-1">
<div class="card-content white-text">
<h4 class="card-title m1">${fit.name} (${
fit.abbr
})<span class="blue-text m-4"> ${fit.capital}</span></h4>
<div class="card-action">
<a>Country Code :</a>
<a>${fit.phoneCode}</a>
</div>
</div>
</div>
</div>
</div>
`).join('');
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.