{"id":299,"date":"2009-05-28T17:21:29","date_gmt":"2009-05-29T00:21:29","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=1457"},"modified":"2009-05-28T17:21:29","modified_gmt":"2009-05-29T00:21:29","slug":"odd-even-classic","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=299","title":{"rendered":"Odd Even Classic"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\n\/\/ from http:\/\/www.bit-101.com\/blog\/?p=729\r\nvar number:Number = 10.5;\r\n\r\n\/\/ for numbers\r\nvar isEven:Boolean = (number % 2) == 0;\r\ntrace(isEven);\r\n\r\n\/\/ for ints\r\nvar integer:int = 10;\r\nisEven = (integer &amp; 1) == 0;\r\ntrace(isEven);\r\n<\/pre>\n<p>This is a classic that I&#8217;ve seen all over the place online&#8230; found myself needing it today and figured I should post it. It just an easy way to determine if a number is odd or even&#8230; I remember originally reading it over at <a href=\"http:\/\/www.bit-101.com\/blog\/?p=729\" target=\"blank\">Bit-101.com<\/a> a few years back&#8230;<\/p>\n<p><em>Two posts today because I think I missed a post recently&#8230;<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ from http:\/\/www.bit-101.com\/blog\/?p=729 var number:Number = 10.5; \/\/ for numbers var isEven:Boolean = (number % 2) == 0; trace(isEven); \/\/ for ints var integer:int = 10; isEven = (integer &amp; 1) == 0; trace(isEven); This is a classic that I&#8217;ve seen all over the place online&#8230; found myself needing it today and figured I should [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[121,36],"tags":[3,4],"class_list":["post-299","post","type-post","status-publish","format-standard","hentry","category-math","category-operators","tag-actionscript","tag-flash"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=299"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/299\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}