Be ready to do your first gig way below your price.
The best way to do this is to offer a discount for new customers. Once you're established you'll instead want to offer discounts for established customers, but framing your low initial price as a discount will help you adjust it to the market rate once you have some experience under your belt.
Do something small but visible as a spare-time project.
This is extremely worthwhile. For example, I organized a meetup for JavaScript developers in my city. It grew over time and is now how I meet a lot of my clients and friends.
The best way to do this is to offer a discount for new customers.
Exactly, good that you highlighted that. And although other party knows that you couldn't ask your price at this point and the discount is not really a discount, I still did say our target price. It feels a bit stupid, but it's worth of it: "Our price is $100 per hour, but as we need a good show case project, we are ready to this for $60 per hour."
One other thing. Try to get gigs that have small enough scope in the beginning. You learn a bit about how to negotiate, how to deliver etc. Plus usually clients like it that you are not trying to structure a deal where you milk them for next 6 months.
The best way to do this is to offer a discount for new customers. Once you're established you'll instead want to offer discounts for established customers, but framing your low initial price as a discount will help you adjust it to the market rate once you have some experience under your belt.
Do something small but visible as a spare-time project.
This is extremely worthwhile. For example, I organized a meetup for JavaScript developers in my city. It grew over time and is now how I meet a lot of my clients and friends.