Preheat air fryer to 400º Fahrenheit. Spray ears of corn with cooking spray. Season with salt and pepper. Place ears in basket of air fryer. Cook for 8-10 minutes, flipping ears halfway through cook time. Butter corn and enjoy!