The Property “SP.Web.ContentTypes (SP.js)” used to return the collection for content types from the particular SharePoint Web. This means, the Site Content Types create under specific site. For more details,

Below is the example snippet used to retrieve the collection of content types and display the Title & Id of each content type for the particular SharePoint website “http://sharepoint-site/subsite”.

Available in : SharePoint Online, SharePoint 2013 +