Robert S. answered 03/23/23
Award-winning agency Creative Director helps you with Photoshop & more
Good question. While Illustrator was originally intended for vector art intended for print, it's also a powerful tool for creating pixel-perfect art for digital projects like web and app design.
To avoid decimals in your X, Y, W, and H properties, to primary function to enable is "Snap to Pixel" under the View > Snap to Pixel menu.
I'd also suggest changing the Units of your document to Pixels if you haven't already, my opening Settings > Units..., and changing and changing General, Stroke, and Type to Pixels.