Results 1 to 3 of 3

Thread: [RESOLVED] quick javascript question

  1. #1

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    Resolved [RESOLVED] quick javascript question

    Hi,

    I have the following code, I was wondering its possible for someone to show me the equivalent of the code in the IF .. THEN format .
    Code:
    A= 5 + (B % 4 = 3)? 1:0)
    Thank You

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    Re: quick javascript question

    Your code is invalid. You have 3 closing brackets, but only 1 opening bracket.

    Assuming it should be:

    Code:
    A = 5 + ((B % 4 = 3)? 1:0)
    Then the following javascript would work:

    Code:
    var A = 5;
    
    if(B % 4 == 3){
      A++;
    }

  3. #3

    Thread Starter
    Frenzied Member met0555's Avatar
    Join Date
    Jul 2006
    Posts
    1,385

    Re: quick javascript question

    ok, thank you that was helpful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width