Double jump with variable jump

I want the user to have multiple jump heights (the longer you hold the button, the higher your jump) while also being able to double jump. (like in I Wanna Be The Guy)

I haven’t found anything about this. So, is it impossible? is there no way to do it?

Variable jump height is in the platformer settings, called “jump sustain time”.
Double jump is done with an action called “allow jumping again”. There are probably several tutorials about this.