Of course it is - You just need to keep track of how many times has the player jumped.
Something like giving the player a counter and incrementing it if they land then jump within a timeframe, otherwise the counter returns to 0. If they jump and the counter is at 2, do triple jump shenanigans.