CRM 2011 JS: Get Current user id

//This is how to get Get Current user id using javascript in CRM 2011

 

 

//Get Current user id

var userID = Xrm.Page.context.getUserId();