3 Create a new post


I keep getting this error. I need HELP !!

Oops, try again. Looks like there is a bug on Line 4: Unexpected token ILLEGAL This is what I have :

var main=function() {
$('btn').click(function() {
var post = $(".status-box').val();

  • ').text(post).prependTo('.posts');

  • #2

    Hi Landen,

    You've got three problems in your code:

    • Line 2, you need to be selecting $('.btn') (the dot (.) is important)
    • Line 3, you need to be consistent with your quotes, you can't mix double (") and single (') quotes.
    • Line 5 needs to have a parenthesis in between the two closing curly braces (}), but I recommend adding a new line as well, so it looks like this:


    I hope this helps, please let me know if you're still having issues with the exercise!