I have a friend who started learning website development and he's into php now. I, on the other side started studying Javascript. He asked me if it's possible to use JS instead of php code entirely?
Well, I started learning JS because someone told me, it can be used for both frontend, backend (via NodeJS) and the database (via MongoDB). Though, since I' m a beginner in this field, I'm not sure in the answer, and I'm interested anyway, so I ask you: is it possible?
He asked me if it's possible to use JS instead of php code entirely?
Yes, it's entirely possible. There are several server-side JavaScript options. Probably the most well-known is NodeJS (usually, but not necessarily, plus Express). But Microsoft has always supported JScript (their dialect of JavaScript) in classic ASP, you can use JavaScript in the Java JVM (via Rhino or Nashorn) and thus use JavaScript in servlets, for years there was SilkJS (built on Google's V8) and now there's its successor DecafJS (built on the JVM), etc.