Condition For Invertible Function Example In Javascript