code: function getNavMap(navMap, searchTerm, portion){
  
  		let returnMap = navMap;
  
  
  		if (!isset(searchTerm) || is_array(searchTerm) && searchTerm.length === 0){
  			//if the search term is an empty array, it will return the full nav map (excluding ROOT)
  			return returnMap;
  		}
  
  		//code for when an array is given (filters results based on numbers and titles provided in array)
  		 if (is_array(searchTerm)){
  	    	returnMap = getSpecificMap(returnMap, searchTerm);
  
  		//code for when a string is given (searches full nav map for Title that matches)
  		} else if (is_string(searchTerm)) {
  			returnMap = getTitleMap(returnMap, searchTerm);
  
  		//code for when a single number is given (treats it as a single level location variable)
  		} else if (is_int(searchTerm)) {
  			returnMap = returnMap[searchTerm];
  
  		//throws error if searchTerm variable doesn't make sense
  		} else {
  			console.log('\nThe search term must be either a string, interval or an array. \nSearch term =\n', searchTerm);
  		}
  
  		if (isset(portion)) {
  			return returnMap[portion];
  		} else {
  			return returnMap;
  		}
  	}
docs: function for looking up a specific portion of the navMap using a location array or a title