SP.Taxonomy.Term.isRoot property (sp.taxonomy)
Gets whether the current Term object is at the root of the TermSet object
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
var value = SP.Taxonomy.Term.get_isRoot()
Return value
true if the current Term is at the root of the TermSet; otherwise, false.