Until recently, that was a contradictory set of goals. Now it's pretty feasible to achieve both goals using C++. But, not so much with hand-written JS... (Feasible, not arguing theoretical)
Kindasorta. They do contradict if you only write one program. But you could write a high-performance 3D game and a web app and achieve both goals, thus justifying learning both JavaScript and C++.