Really difficult to do it from scratch but i know how to now, its been a long and challenging 2 years of learning - making constant scripts that fail massively till i eventually got it to work, some times i had to disscet some C++ game source code to see how they approach things more efficiently :P
But i find it fun personally im sure others would lose patience very quickly. Then there is the networking using web sockets and long polling systems for "live action" between players, calling a server has to be efficient when you scale to many thousands of players, its difficult to know when making an engine, if it is the best it can be or if you have not heard about a better method.
I can assure you its ALOT harder than PHP if you use JS to its full capabilities. I'm not referring to things like Travian, which is heavy JS but it does not have a render engine, its simply manipulating the elements on the screen.
So yes JS is harder - depending on what you're using it for... if you use it to just make PHP browser game more slick then no.