What Programming Language?

I am wondering how, as a developer, you decide what is the best, or most appropriate programming language to use when considering a new project.

I appreciate that in many cases the decision may be obvious. There are specifics for Apps on Android or iPhone and Python would be a clear choice for data science but what if you were planning a website with a lot of interaction? Membership, payment options, search facilities, interaction between members, chat, etc.

Would Javascript be the obvious choice or would something of this nature require a mix of different languages and back to the original question how do you, at an initial planning stage, decide which one or which ones?

hard question
In my experience people rely on senior software developers or architects for this type of advice. Otherwise you have to go with what you are comfortable with until something bad happens and then you adapt.
For eg. say I am comfortable with python. Maybe I start with that and then I hit some kind of performance snag. Well then I pivot. I don’t rewrite everything but maybe I rewrite the part that needs the other language.
People with more experience have seen what different languages can do in different spaces in the industry so they make their decisions based on this.

Any interaction with a user is via JavaScript which is all frontend. The main question becomes what you want to use on the backend. If you already know JavaScript, then you can learn a bit more and use NodeJS for the backend. You could also use Python or another language for the backend too. It will really depend on what type of processing of data that needs to be done. If you need to process a lot of data and make a lot of complex calculations, you may choose to do it on the backend and opt for Python (using a framework like Django) or Ruby (Ruby on Rails).

Thanks for the replies here.

If you learn .Net (ASP, C#) and JavaScript (React.js, Node.js. Express.js) and SQL Database (MySQL, PostgeSQL and Microsoft SQL Server 2019) as Stack, I think would be okay. Also PHP will do just fine with Laravel Framework. Now a days I think companies are prefering AWS (Amazon Web Service) as serverless cloud platform and basic skill in it would be fine.

Thanks, Bushmaster.

That sounds like a long-term learning curve.