//this is short hand not actual code please
var = trainNum = 0;
// on button click
trainNum++;
// I can't figure out the format to put in so that firebase treats trainNum as the variable and not a string.
database.ref(Trains/**I WANT THIS TO EQUAL THE trainNum as it increments **).push({
});
//Train number is being stored in database I don't know if this will effect outcome.
问问题
28 次