Heat a gas or charcoal grill until moderately hot; adjust the rack about 4 inches from the heat source. Or, turn the oven to 500°F.
Grill or roast the corn, turning a few times until some of the kernels char a bit and others are lightly browned, 8 to 15 minutes total. Serve with salt, pepper, and butter if you like.