My aunt recently bought a 2016 Elantra, just 42,000 miles. Carfax showed it had had one owner, had been serviced regularly and no wrecks.
She had it just seven days when it wouldn't acclerate up a small hill very well. The next day the check engine light came on and it stalled out on her. She took it to the dealer she bought it from who said it was all just a loose battery cable. That was two days ago and there have been no problems since. But I figured a loose battery cable would mean it would start, not stalling out like that.