Question: Is it possible to get the department of the current user using REST API (Javascript)?

Answer: 
Yes, it is possible.. Try the following request:

`http://siteurl/_api/SP.UserProfiles.PeopleManager/GetMyProperties?$select=Department`

If this doesn't work you might need to use the following:

For Office 365/SharePoint Online:

`http://siteurl/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='Department')?@v='i:0%23.f|membership|user@siteurl.onmicrosoft.com'`

For SharePoint 2013 On-Premise:

`http://siteurl/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='Department')?@v='domain\username'`

Reference:

[SharePoint 2013: Get UserProfile Properties with REST API](http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html)
Another way to do this without passing @v parameter:

```
var siteUrl = _spPageContextInfo.siteAbsoluteUrl;
$.ajax({
    url: siteUrl + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties",
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose" },
    success: function (data) {
        for (var i = 0; i < data.d.UserProfileProperties.results.length; i++) {
            switch (data.d.UserProfileProperties.results[i].Key) {
                case "Department":
                    alert(data.d.UserProfileProperties.results[i].Value);
                    break;
            }
        }
    },
    error: function (error) {
        console.log(error);
    }
});

```