how to preload audio file using javascript?

Solution 1:

Check the path for the Audio File.

The audio file must be in the main directory. (The directory in which index.html is present ).

Check here for Working Code.