basic function in javascript not working -
hi first time here , i'm struggling since i'm first timer learning code. presume when seek pass arguments parameters, gets confused, or maybe i'm missing simple. missing or failing here? doesn't work...
function adultcheck(age,name) { if (age <= 17) { alert("sorry " + name ", not allowed see this, young."); } else { alert("welcome " + name ", " + age " visit our lounge!"); } } adultcheck(15,tami);
you forgot add together additional + after variables: "" + name + ""
javascript function jscript
No comments:
Post a Comment