Waypoints and AI pathfinding

I would like to know how to get a character to find its current position and then find the position of a gameobject (waypoint1) and move towards it. I have made a walk function and a moveSpeed and turnSpeed variables. Can someone help? PS is it possible for all of the scripting to be javascript as I don't understand C#.

This may be more (or less) than what you really need - but this site provides some pretty in-depth information on A*-pathfinding and also a project that will handle pathfinding for you: A* Pathfinding.

There is also an older approach linked from the Unifycommunity Wiki: Pathfinding.

Related question: Pathfinding tools in Unity?

Simply moving towards an object could be achieved with Transform.LookAt(target:Transform). Once you look at the target object, you can simply move forward.