Problem

Return base^exp using a while loop (exp >= 0).

Examples

  • powerLoop(2, 3) -> 8
  • powerLoop(5, 0) -> 1
Compile and test (Ctrl+Enter)