How to have nested objects in JS?
<p>I am a c++ programmer, Here is a C++ code, how to have similar JS code,</p>

<pre><code>class A {
 public:
  void sayHello();
};

class B  {
 public:
  A a;
};

main()
{
 B b;
 b.a.sayHello(); 
}
</code></pre>
