How to set a specific rotation?

Alright so how would you say “Set rotation of the y axis to 45”. And how would you do that for position also? Please in JavaScript. Thanks!

http://unity3d.com/support/documentation/ScriptReference/Transform-eulerAngles.html
http://unity3d.com/support/documentation/ScriptReference/Transform-position.html