can you help me,about Javascript??

Hi,friends…There is a car in my scene, running after the game, when the mouse click on the left side of the door the door is open, click again, the door closed, I have made the door opening and closing of the animation, the use of JS should be how to write? Thank you :p:p

Are you totally new to Scripting and how to add scripts to your door? If not, just use this:

animation.Play(“opendoor or whats the animationname is…”);