Aiste,
The most inexpensive way would be to use mass transit. First you take the AirTrain from your terminal to the Howard Beach subway station. This is $5.00. Then you take the A train subway to Manhattan, about a 45-minute ride. You get off at 42nd Street, Port Authority. From the Port Authority Bus Terminal you take a New Jersey Transit bus to Atlantic City. I think the bus number is 319, boarding at gate 319. The cost is $28.00.
Aiste, The most inexpensive