Solución
solution.tsTypeScript
export function isPowerOfTwo(n: number): boolean {
// Escribe tu solución aquí
for(let i = 0; i < n; i++){
const power = Math.pow(2,i);
if(power === n) return true;
if(power > n) return false;
}
return false;
}0respuestas