Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript One Solution

My code is not working

$("#addNew").on("click", function(e){

const inputs = $("#newRestaurant").val(); $("ul").append(inputs);

});

Could you provide this as a snapshot? It is the camera icon in the upper right corner.

2 Answers

Mark Warren
Mark Warren
19,252 Points

Hi Uche,

You have an unnecessary parameter 'e' in function(e).

Try:

$("#addNew").on("click", function(){

const inputs = $("#newRestaurant").val(); $("ul").append(inputs);

});

The input that you are taking the value of has an id="newRestaurantInput", you are selecting $("#newRestaurant") (missing the 'Input' part at the end).