Is Android fingerprint enrollment possible?

I know how to use fingerprint authentification, but I want to start from a wiped device. Is it therefore possible by some command to enroll a fingerprint on Android? I know it can be done on iOS, can it be done on Android as well? I prefer JavaScript, if possible.