File names under /public from /lib/globals.js

I have several avatar images under my public/avatars/ and I want in my lib/globals.js to be able to store all the avatars paths (e.g., ‘/avatars/bee.png’) into a global array called AVATARS. At the moment, I am doing it manually in globals.js

AVATARS =[];
AVATARS[0] = '/avatars/bee.png';
AVATARS[1] = '/avatars/bird.png';
AVATARS[2] = '/avatars/cat.png';

But I am sure there must be a more modular way, given that the number of avatars will become very very large in the future.