12345678910111213141516171819202122232425 |
- /*
- * The type script comes here
- */
- import { Dog } from './js/Dog';
- import { Cat } from './js/Cat';
- let animals = [
- new Dog('nora', 'noa'),
- new Dog('shoën', 'noa'),
- new Dog('medor', 'noa'),
- new Cat('felix')
- ];
- let template = '<ul>';
- for (let animal of animals) {
- template += '<li>'+animal.greet()+'</li>';
- }
- template += '</ul>';
- document.body.innerHTML = template;
|