This problem has existed ever since jobs. How do you get a job without experience? And how do you get experience without a job?
The first thing to understand is that an employer is really interested in making sure you can do a job before going through the process of hiring you. Experience is just one way to determine if you can do a job. And it’s actually not a very good or reliable method to use.
A lot of employers look for experience because it’s simple. How many years is an easy question to ask. And there will always be those hiring managers who don’t realize that there’s a better way.
What you need to do is prove that you can do a job and do it reliably. It’s perfectly fine to tell a potential employer where you learned how to do something. In fact, it’s always better to tell the truth. Don’t try to hide anything and pretend you’ve been doing something for years. It doesn’t really matter. What matters is, “Can you do the job?”
This is why artists bring a portfolio with them to a job interview. It’s why photographers show off previous pictures they’ve taken. And it’s why you should have something of your own that you’ve coded to show what you can do.
I was hired once because of a project that I was working on in my spare time. I printed out the source code and brought it with me to the interview. You can’t do this with software that belongs to a previous company that you’ve worked at. But you can do the same thing with software that you write yourself.
That’s your experience.
And no employer in their right mind will ignore solid proof that you can code when you can show them like this.