Most of the top ranking and renowned websites are now based on PHP platform.
Java Script is widely used client side development language. HTML pages can be dynamic and improves its user experience with Java Script. Any code functions can be run immediately instead of communicating to server and wait for an answer because of the speed of Java Script.
As Java Script is interpreted line by line, it is easy to debug and easy find the error in the code which can be easily correctable.