SzabiSch / bootcamp-schedule

0 stars 0 forks source link

First JavaScript Web App: Logical Checks #77

Closed codingbootcampseu closed 2 years ago

codingbootcampseu commented 2 years ago

Hints

Use the trim() method to remove leading and/or trailing spaces.

let str = "   test ";
str = str.trim(); // str is now "test"

You can use custom attributes to add additional information to HTML elements.

const li = document.createElement('li');
li.setAttribute('data-todo', newTodoText);

In JavaScript it is possible to dynamically add new keys to existing objects.

const li = document.createElement('li');
li.todo = 'your todo text';

Example Solution and Comparison

SzabiSch commented 2 years ago

Fehlersuche ist was feines, besonders wenn man Stunden braucht festzustellen was der Fehler sein sollte.