examples/thanker.js
function msg_followers_thanks(){
	
	//move cursor
	_current_index++;

	//if there is no followers OR finished messaging followers stop
	if(_current_index >= _followers_list.length  ){
		_current_index = -1;
		_followe_list = null;
		return;
	}
		//otherwise get user name from twitter 
		twit_cli.get("users/show",{screen_name:_followers_list[_current_index]}, function (err,dt){
			
			//clean up the name
			var dude = filter_name(dt.name);
           		
			//message the user
			 twit_cli.post("direct_messages/new" , {screen_name:_followers_list[_current_index],text:random_msg(dude)}, function (err,dt){
					if(!err) console.log("done...");

					//go for another round
				 	msg_followers_thanks();
			});
           
		});

}
function msg_followers_thanks(){
	
	//move cursor
	_current_index++;

	//if there is no followers OR finished messaging followers stop
	if(_current_index >= _followers_list.length  ){
		_current_index = -1;
		_followe_list = null;
		return;
	}
		//otherwise get user name from twitter 
		twit_cli.get("users/show",{screen_name:_followers_list[_current_index]}, function (err,dt){
			
			//clean up the name
			var dude = filter_name(dt.name);
           		
			//message the user
			 twit_cli.post("direct_messages/new" , {screen_name:_followers_list[_current_index],text:random_msg(dude)}, function (err,dt){
					if(!err) console.log("done...");

					//go for another round
				 	msg_followers_thanks();
			});
           
		});

}
function msg_followers_thanks ( ) { //move cursor _current_index ++ ; //if there is no followers OR finished messaging followers stop if ( _current_index >= _followers_list . length ) { _current_index = - 1 ; _followe_list = null ; return ; } //otherwise get user name from twitter  twit_cli . get ( "users/show" , { screen_name : _followers_list [ _current_index ] } , function ( err , dt ) { //clean up the name var dude = filter_name ( dt . name ) ; //message the user twit_cli . post ( "direct_messages/new" , { screen_name : _followers_list [ _current_index ] , text : random_msg ( dude ) } , function ( err , dt ) { if ( ! err ) console . log ( "done..." ) ; //go for another round msg_followers_thanks ( ) ; } ) ; } ) ; }
this function iterates through followers listed in variable _followers_list
this function iterates through followers listed in variable _followers_list