It didn't happened to me but there are ants on my table and keyboard and I saw the same problem with other people that I've met online. Ants on modems, laptops, desktops and other devices that these ants can stay.
I guess you eat when you use your laptop and when there are ants on my table, the same procedure as @peter0425 did, I spray alcohol on my table and luckily, they were gone.
If worse case scenario happens and your laptop suddenly shut downs, it's possible that those ants affected the board.
Yes, that's because I eat while working on laptop. I read it on the internet that if a ant dies in between the connectors, circuits than it might cause a malfunction. Even though this is a rare case but yet it makes me worry as my laptop has most important backups/etc.
Yes, that's for sure and it will happen. I haven't tried it but I've read a lot of common problems like this and the same experience so I'm more cautious and to avoid this incident for me.
And if it worries, then create a backup first so that you are prepared if something bad happens. You can put a cloth first before putting the food that you are about to it so that stains from that food or drink will go to the cloth which you can wash later and it won't attract any more ants.
Currently, I've kept my laptop in sun hoping the ants would leave the laptop be because of 38° to 40° current temperature as it is almost 3:00PM here. I'm expecting till 5:00PM thr ants should leave orelse I'm moving onto sprinkling alcohol and blowing it off ASAP.