Title: help about Javascript &#8211; Math
Last modified: August 19, 2016

---

# help about Javascript – Math

 *  Resolved [taghaboy](https://wordpress.org/support/users/taghaboy/)
 * (@taghaboy)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/help-about-javascript-math/)
 * hello,
    if i’d like to know if a user select the number of days between **1 to
   3 days** the condition will be like this :**numdays<=3** `if(nomdays<=3) { alert("
   you select a day between 1 to 3");}`
 * but what about this :
    **4 to 6 days** is it_ numdays<=6_ ???? **7 to 13 days****
   14 to 20 days**
 * thanks for help

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [taghaboy](https://wordpress.org/support/users/taghaboy/)
 * (@taghaboy)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/help-about-javascript-math/#post-1641416)
 * Any idea pls.
 *  Thread Starter [taghaboy](https://wordpress.org/support/users/taghaboy/)
 * (@taghaboy)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/help-about-javascript-math/#post-1641419)
 * is this possible for 4 to 6 days
    `numdays>3 && numdays<6` so `if(numdays>3 &&
   numdays<6) { alert("you select a day between 4 to 6");}`
 * ?
 *  Thread Starter [taghaboy](https://wordpress.org/support/users/taghaboy/)
 * (@taghaboy)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/help-about-javascript-math/#post-1641556)
 * Find it
    for **4 to 6 days** `numdays>3&&numdays<=6`
 * so, for actions :
 *     ```
       if(nomjours<=3)
       	{
       		alert("you select a day between 1 to 3");
       	}
   
       	else if(nomjours>3&&nomjours<=6)
       		{
       			alert("you select a day between 4 to 6");
       		}	
   
       	else if(nomjours>6&&nomjours<=13)
       		{
       			alert("you select a day between 7 to 13");
       		}
   
       	else if(nomjours>13&&nomjours<=20)
       		{
       			alert("you select a day between 14 to 20");
       		}	
   
       else
       	{
       		alert("you select a day more then 20");
       	}
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘help about Javascript – Math’ is closed to new replies.

## Tags

 * [conditional](https://wordpress.org/support/topic-tag/conditional/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [Math](https://wordpress.org/support/topic-tag/math/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 1 participant
 * Last reply from: [taghaboy](https://wordpress.org/support/users/taghaboy/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/help-about-javascript-math/#post-1641556)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
