11 lines
434 B
JavaScript
11 lines
434 B
JavaScript
export function createMutationsSection(mutarray) {
|
|
// Mutations section
|
|
let mutations = document.createElement('div');
|
|
mutations.className = 'creature_mutations';
|
|
let mutationsHTML = '<h3>Mutations</h3>';
|
|
let mutationsList = mutarray.reduce((result, mutation) => result + `<li>${mutation}</li>`, '');
|
|
mutationsHTML += `<ul>${mutationsList}</ul>`;
|
|
mutations.innerHTML = mutationsHTML
|
|
return mutations
|
|
}
|