Javascript and BAM