To-do list works, but only shows 'undefined'


#1

Hello!

My To-do list works, and codecademy say's everything is okay. But is isn't.
I can add and delete things of the to do list. But it doesn't matter whether i fill in text in the textfiel or not,
I only get the output of 'undefined'. Can someone see what i did wrong?

$(document).ready(function(){

$('#button').click(function(){
var toAdd = $('input[name=checklistItem]').val();
$('.list').append('<div class= "item">'+ toAdd + '</div>');
});  

$(document).on('click', '.item', function(){
   $(this).remove(); 
});

});

Thanks in anvance :slightly_smiling:


#2

Hi Romanamiltenburg,

Check

in your JavaScript, versus how it's capitalized in the HTML file :slightly_smiling: