Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 5x 1x 4x 1x 3x | class BaseTemplate {
constructor(elements) {
if (!Array.isArray(elements)) {
throw new Error('elements must be an array.');
}
if (elements.length > 10) {
throw new Error('You cannot have more than 10 elements in the template.');
}
this.elements = elements;
}
}
export default BaseTemplate;
|