Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7077797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:28:04+00:00 2026-05-28T06:28:04+00:00

I need to have an if statement to check if a number is =

  • 0

I need to have an if statement to check if a number is = 0, or between 5000 and 3600000. How can have it check all 3 conditions?

Number can be 0 or 5000 or above OR 3600000 or less. It can’t be -1, 1.1 2.3 or anything between 0 and 5.

Here is what I have now and this work for checking if less than 5000 or greater than 3600000

var intervalCheck = interval * digit
if(isNaN(intervalCheck))
{
    alert("Must be a number.");
}
else if((intervalCheck < 5000)||(intervalCheck>=3600000))
{
    alert("Must be between 5 seconds and 1 hour.");
}
else
{
    localStorage["interval_setting"] = interval * digit;
    saveActions();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:28:05+00:00Added an answer on May 28, 2026 at 6:28 am
    if ((intervalCheck == 0) || (intervalCheck >= 5000 && intervalCheck <= 3600000)) {
        // put your code here
    }
    

    You can combine as many logic operations as you want into one if statement using any of the javascript logic and comparision operators.

    You can see a demo work here: http://jsfiddle.net/jfriend00/y5tRK/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I check if my UILabel value is above 0? I just need
What I need to have the statement do is: From the name, output duplicate
I have a statement similar to this that I need to run in Linq.
I have a SQL Statement where i need to display the value from another
I have the following statement that I need to run on a table which
I have an if statement, and I need to compare a single string with
I have a LINQ statement that returns an anonymous type. I need to get
I have a pretty complex linq statement I need to access for different methods.
I have a dynamic SQL statement I've created in a stored procedure. I need
I need your help. Say I have a code inside a for statement similar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.