I'm no kind of small engine mechanic but my friend gave me a gas mower which worked great when I started it. Turned it off and back on a few times, then when I was almost finished the yard it conked out in some thick weeds and wouldn't start again.
Funny thing is if I turn it on its side, and then set it back up again, it will start up and sputter for two or three seconds before dying. And then nothing, no matter how many times I pull the cord. But turn it over sideways, set it back upright, and I can get it going for a few seconds.