How is や used in this sentence?


[![enter image description
here](https://i.stack.imgur.com/fHog2.png)](https://i.stack.imgur.com/fHog2.png)

や? Is the character correcting himself?




It's enumeration.

店にはりんごやきゅうり、たまごなどが置いてあった。

At the store, I saw apples, cucumbers, and eggs and such.

You could use it to join all items, like

りんごやきゅうりやたまご

...and that would still be grammatically correct, but personally, I prefer
using や on joining the first two items only. Just my style, just like how some
prefer oxford commas and some don't.

