Earlier quoted context omitted.
Javascript was marketed towards Java programmers, and those languages are pretty different from each other too.
I would say that C++ is closer to Java than JavaScript is; it's fairly easy to copy-paste and edit C++ code into a Java file with, just changing a small amount of syntax and get rid of the manual memory allocations. Try copy-pasting JS into a Java file, and there are semantics there that are completely foreign; you can't simply translate it.
I disagree about Java and C++. If I have a C++ file that uses RAII or references, for example, it won’t translate to Java easily. And those aren’t unusual, they’re both common techniques.