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, https://msdn.microsoft.com/en-us/library/office/jj245580.aspx

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 +