How to call backend services from javascript with 2 way SSL implemented

i am not sure if you can access the keystores via js…what we ended up doing was using js to do validations but using the javacallout or target endpoint (server) to do 2way tls