Using LookAt in Javascript

I have a javascript applied to my camera, that will move it to certain locations in my scene, by pressing certain buttons. I can get the camera to that position, but how to I apply the LookAt script and set it up so that it looks at that particular target, once it gets to that particular target?

Once it gets to the target, just do something like this :

transform.LookAt(target);