reload page after sweetalert code example

Example 1: location.reload sweetalert

swal({
  title: "Good job",
  text: "You clicked the button!",
  icon: "success",
  buttons: [
    'NO',
    'YES'
  ],
}).then(function(isConfirm) {
  if (isConfirm) {
    location.reload();
  } else {
    //if no clicked => do something else
  }
});

Example 2: location.reload sweetalert

swal({title: "Good job", text: "You clicked the button!", type: 
"success"}).then(function(){ 
   location.reload();
   }
);

Example 3: location.reload sweetalert

swal({title: "Good job", text: "You clicked the button!", type: "success"},
   function(){ 
       location.reload();
   }
);