what does the electrolyte in batteries do?

http://www.qrg.northwestern.edu/projects/vss/docs/power/2-how-do-batteries-work.html

so it transfers the electrons

(based on what I know)

I read that article more closely and it really doesn't tell us much. You are right. The electrolyte provides a path for the cations and anions in the reaction to move from one electrode to th other. The electrons, themselves, move from one electrode to the other through the wires connected to each electrode.

In a CuSO4/ZnSO4 battery, the Zn electrode is - and the Cu electrode is +. The Zn goes into Zn^2+ and the Cu^2+ come out of solution to form Cu. The electrons travel through the outside wire to accomplish this transfer while excess SO4^2- are transferred from the Cu side to the Zn side to equalize the charges.

can the electrolyte be a salt (NaCl of KCl)

also I was researching and I was wondering what an ionic current was

In some cases, yes, KCl and NaCl can be an electrolyte. If we place battery electrodes into a solution of, say molten NaCl, then Na ions will flow toward the - electrode and Cl ions will flow toward the + electrode. That is an ionic current

Usually the salt is contained in what they refer to as a salt bridge. Connecting the electrodes of the experimented ions.

if i made a simple circuit with an NaCl in between is that similar to what the electrolyte in a battery does

so does that mean that i can put NaCl in substitute of whatever is currently in the battery

Generally, no.

a. it is too corrosive(although it was the electrolyte used in one of the first cells by Volta.)
b. it will not go through the reactions you want In a dry cell the MnO2 functions as one of the reactions.