You are reading the documentation for version 2.2. Magento 2.3 is the latest version available. Ensure you are reading the documentation for your version of Magento.

Modal widget

Go back to JavaScript section of the Frontend Developer Guide.