One, is to toggle the feature by going into Settings > Administration > Enable Legacy Forms.
Here is a piece of code that you can use to detect if Turbo Forms are enabled or not.
var turboFormsEnabled = Xrm.Internal.isTurboForm();
Please note, this function is not documented for public use, therefore consider this as unsupported
A bit of insight into this Xrm.Internal function; this function calls Mscrm.Utilities.isTurboForm which then checks window.IsTurboForm; if window.IsTurboForm is undefined, returns false, otherwise true.