Pages

Sunday, August 7, 2011

Write a Function that takes 4 input parameters and returns true only if all four of them are true

Write a Function that takes 4 input parameters and returns true only if all four of them are true?

1 comment:

  1. function checkboolean(var1,var2,var3,var4)
    {
    if(var1 && var2 && var3 && var4)
    document.write("true");
    else
    document.write("false")
    }
    a=true;
    b=false;
    c=true;
    d=true;
    checkboolean(a, b, c, d);
    a=true;
    b=true;
    c=true;
    d=true;
    checkboolean(a, b, c, d);

    ReplyDelete