Close a Popup from a Javascript Snippet

one more question would you know how to close the popup from the javascript snippet? Note: This topic was created from a reply on the loop through rows in a model topic.

Here is the syntax: 

skuid.$(‘.ui-dialog-content’).last().dialog(‘close’);