There are three browser-specific functions to interact with visitors: alert, prompt, and confirm. All these methods are modal - they pause script execution and don’t allow the visitor to interact with the rest of the page until the window has been dismissed.
In programming terms, a library is a grouping of code that provides common or additional functionality. Libraries consist of one or more files that expose objects and functions. Within a program, a developer includes or calls the library to use these additional objects and functions.