The silver nitrate test that there was an anion present in the solution, that will cause silver cations to precipitate.
Silver usually precipitates as chloride, but also as bromide, iodide and others salts.
As you have used HCl and NaOH solutions, it must be the chloride.
The overall reaction you have had there was:
AgNO3 (aqueous) + NaCl (aqueous) -----> AgCl (white precipitate) + NaNO3 (aqueous)
or, in a ionic form:
Ag+ (aqueous) + Cl- (aqueous) -----> AgCl (white precipitate)