1 var tasks: string[] = [];
3 function createViewTask(task: string) {
4 const viewTask = document.createElement("div");
5 viewTask.appendChild(document.createTextNode(task));
9 function updateView() {
10 tasks.forEach((t) => document.getElementById(t) || document.body.appendChild(createViewTask(t)));
13 function addTask(task: string) {
18 function browserCreateTask(form: any) {
19 addTask(form.taskName.value);
20 form.taskName.value = "";