Refresh web part without refreshing page in SharePoint

The following code shows how to refresh web part without refreshing page in SharePoint.

Source: https://pradiprathod.wordpress.com/2015/05/04/how-to-refresh-list-view-in-sharepoint-2013-using-javascript/