JSOM Get list content types

List content types can be retrieved with the following javascript code;

CODE