C++ Concepts in JavaScript