You can simply set the session value to an asp:HiddenField and access that hidden field value in javascripts.
C# code
HiddenField1.Value = Session["keyName"];
In javascripts, access that value like below
var sessionVal = document.getElementById('<%=HiddenField1.ClientID%>').value;
or you can try this way as well
var username = '<%= Session["UserName"] %>';
alert(username );
Regards,
Praveen Nelge
[edit]Code block fixed[/edit]