Box2d, from C to javascript

There are a lot of nice info about Box2d that are quite very helpful but most of it is written in C. My knowledge of C is quite basic and thus i don't understand everything when i try to convert a code from C into Javascript.
Here's an example from box2d manual part 2.2:
code in C:
Code:
b2BodyDef goundBodyDef;
groundBodyDef.position.Set(0.0, -10.0);
b2Body* groundBody = world.CreateBody(&groundBodyDef);//that's the line i don't understand. What is * after b2Body how do i write this line in Javascript?
b2PolygonShape groundBox;
groundBox.SetAsBox(50.0, 10.0);
groundBody->CreateFixture(&groundBox, 0.0);//that's the last line i don't understand. What is this arrow -> and how do i write this line in Javascript?

this is how i wrote it in javascript:
Code:
var groundBodyDef = new b2BodyDef();
groundBodyDef.position.Set(0.0, -10.0);
//the 1st line of code in question
var groundBox = new b2PolygonShape();
groundBox.SetAsBox(50.0, 10.0);
//the 2nd line of code in question
The * indicates that the variable is a pointer. Javascript does not have pointers so you don't need it.
The -> means to dereference a pointer. Javascript does not have pointers, so it will always be . instead.

By the way, there are a lot of examples about box2dweb if you look around (I'm only assuming you are using box2dweb because you didn't say). Eg:
http://blog.sethladd.com/2011/09/box2d- ... rough.html
http://codingowl.com/readblog.php?blogid=109
http://codingowl.com/readblog.php?blogid=110
my bad, i didn't even know about box2dweb. damn it all makes so sense now... it was exactly what i needed!

Original thread: https://box2d.org/forum/viewtopic.php?t=9823