Tried this in my environment (SharePoint 2013 on-prem) and it is working for me.
<script type="text/javascript">
$(document).ready(function() {
// Get current user id
var userid = _spPageContextInfo.userId;
console.log(userid);
// Rest call Created by current user
// var requestUri = "/_api/lists/getbytitle('Listname')/items?$select=Title,Author/Id&$filter=Author/Id eq " + userid + "&$expand=Author";
// Rest call Modified by current user
var requestUri = "/_api/lists/getbytitle('Listname')/items?$select=Title,Editor/Id&$filter=Editor/Id eq " + userid + "&$expand=Editor";
$.ajax({
url: requestUri,
type: "GET",
headers: { "ACCEPT": "application/json;odata=verbose" },
success: function (data) {
$.each(data.d.results, function (i, item){
var title = item.Title;
console.log("The title is: " + title);
})
},
error: function () {
alert("Error getting items");
}
});
});
</script>
Hope this helps.