tsmithinnc
asked on
Javascript question
My son asked for help and I can't help him...
any ideas???
ROFL...I KNOW it frightens you that my offspring is learning this too...lol
var foo = 5 + 6 * 7
var bar = foo % 8
var moo = bar * 2
var rar = moo / 3
function check(x)
{
if (x.length == moo)
{
alert("win!");
window.location += "?lvl_password="+x;
} else {
alert("fail D:");
}
}
any ideas???
ROFL...I KNOW it frightens you that my offspring is learning this too...lol
var foo = 5 + 6 * 7
var bar = foo % 8
var moo = bar * 2
var rar = moo / 3
function check(x)
{
if (x.length == moo)
{
alert("win!");
window.location += "?lvl_password="+x;
} else {
alert("fail D:");
}
}
You'll have to be more specific. What is the objective here? What does this do? What do you need help with? Do you need an explanation as to what's going on here?
var foo = 5 + 6 * 7;
var bar = foo % 8;
var moo = bar * 2;
var rar = moo / 3;
function check(x)
{
if (x.length == moo)
{
alert("win!");
window.location += "?lvl_password="+x;
} else {
alert("fail D:");
}
}
you need ; after every statement?
var bar = foo % 8;
var moo = bar * 2;
var rar = moo / 3;
function check(x)
{
if (x.length == moo)
{
alert("win!");
window.location += "?lvl_password="+x;
} else {
alert("fail D:");
}
}
you need ; after every statement?
ASKER
I have no idea what it is doing...he says it is giving him 14, but ...
I told him the function is saying if the length of x is 14 then he will get a prompt saying win...
otherwise fail...
is that right???
I told him the function is saying if the length of x is 14 then he will get a prompt saying win...
otherwise fail...
is that right???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.