js/timber.js
//Vote for a tree (up or down)
Vote for a tree (up or down)
Vote for a tree ( up or down )
function vote(delta, treeID) {
	var currScore
	treeReference.child(treeID.toString()).child('score').on('value', function(snapshot){
		currScore = snapshot.val();
	})
	currScore += delta;
	treeReference.child(treeID.toString()).child('score').set(currScore);
}
function vote ( delta , treeID ) { var currScore treeReference . child ( treeID . toString ( ) ) . child ( 'score' ) . on ( 'value' , function ( snapshot ) { currScore = snapshot . val ( ) ; } ) currScore += delta ; treeReference . child ( treeID . toString ( ) ) . child ( 'score' ) . set ( currScore ) ; }
Vote for a tree (up or down)
Vote for a tree ( up or down )