Preheat your air fryer to 390°F (200°C) for about 3-5 minutes.
Place each ear of corn on a piece of aluminum foil large enough to wrap it completely.
Place 1 tablespoon of butter on each ear of corn.
Sprinkle each ear of corn with salt, dividing it evenly among them.
Wrap each ear of corn tightly in the aluminum foil.
Place the wrapped corn in the air fryer basket, arranging them in a single layer.
Cook in the air fryer at 390°F (200°C) for 10 minutes.
After 10 minutes, carefully unwrap the corn and return them to the air fryer basket.
Cook uncovered for an additional 3 minutes to allow the corn to develop a slight char and enhance the flavor.
Once cooked, remove the sweetcorn from the air fryer and serve hot.