From a1973755263c0c14e1503090a9fcc963fcd2b69f Mon Sep 17 00:00:00 2001 From: Lakshya Keshwani Date: Sat, 4 Jul 2026 15:36:41 +0530 Subject: [PATCH] Convert prompt inputs to numbers with unary plus Added unary plus to prompt inputs for type conversion. --- 1-js/02-first-steps/15-function-basics/4-pow/solution.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/02-first-steps/15-function-basics/4-pow/solution.md b/1-js/02-first-steps/15-function-basics/4-pow/solution.md index 19fe9011fc..b9c295d52c 100644 --- a/1-js/02-first-steps/15-function-basics/4-pow/solution.md +++ b/1-js/02-first-steps/15-function-basics/4-pow/solution.md @@ -10,8 +10,8 @@ function pow(x, n) { return result; } -let x = prompt("x?", ''); -let n = prompt("n?", ''); +let x = +prompt("x?", ''); +let n = +prompt("n?", ''); if (n < 1) { alert(`Power ${n} is not supported, use a positive integer`);