# Quick integer question

**URL:** <https://forum.kirupa.com/t/quick-integer-question/269081>\
**Category:** flash\
**Created:** [August 22, 2008, 9:46am UTC](https://forum.kirupa.com/t/quick-integer-question/269081 "2008-08-22T09:46:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisef](https://avatars.discourse-cdn.com/v4/letter/c/8baadc/32.png) [@chrisef](https://forum.kirupa.com/u/chrisef)\
**Post date:** [August 22, 2008, 9:46am UTC](https://forum.kirupa.com/t/quick-integer-question/269081/1 "2008-08-22T09:46:33Z")

</div>

I’ve had a look for the answer to this online and can’t find a solution. I need the following code to check for an integer. My attempt is below and the code in red isn’t working. Can anyone tell me how this is done?

Thanks for looking.

```auto

for (var j:int = 0; j < 24; j++) {
	var myVar = colCount/4;
	if ([COLOR="Red"]j/colCount = int[/COLOR]) {
		trace("INTEGER");
	} else if ([COLOR="Red"]j/colCount != int[/COLOR]) {
		trace("Not an integer");
	}
}

```
