I’ve read here that we need to use single quotes to “Clear out the status box”, and it does work if we change all double quotes. But then I tried several options to see what is accepted, and it is a bit odd:
NOT ACCEPTED:
function click() { var post = $(".status-box").val(); $('.status-box').val(''); $("<li>").text(post).prependTo(".posts"); }
ACCEPTED (see line 2):
function click() { var post = $('.status-box').val(); $('.status-box').val(''); $("<li>").text(post).prependTo(".posts"); }
ACCEPTED (see line 4):
function click() { var post = $(".status-box").val(); $('.status-box').val(''); $('<li>').text(post).prependTo(".posts"); }
NOT ACCEPTED (see line 4):
function click() { var post = $(".status-box").val(); $('.status-box').val(''); $("<li>").text(post).prependTo('.posts'); }
and most importantly,
ACCEPTED (see line 5):
function click() { var post = $(".status-box").val(); $("<li>").text(post).prependTo(".posts"); } $('.status-box').val('');
which not only doesn’t work, but even triggers an error:
SyntaxError: missing ) after argument list
Is this the place to report such a bug/problem?