How to check if a file exists in JavaScript?

How to check if a file exists in JavaScript?

More to explore

Based on this image's title: “How to check if a file exists in JavaScript?