+ 5
audio is a class
so you need to write
var audio= new Audio() and not
var audio=new audio()
notice A is in caps ..
Aside : and if you wish you can also combine play/pause in one function . Just like this : https://code.sololearn.com/Wjm8oXh7F7Gd/?ref=app
+ 2
xD
you're welcome...