diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-recursion-by-building-a-decimal-to-binary-converter/64646577f28ade99100a55c3.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-recursion-by-building-a-decimal-to-binary-converter/64646577f28ade99100a55c3.md index 53aa9adb57e..5d1333e02c0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-recursion-by-building-a-decimal-to-binary-converter/64646577f28ade99100a55c3.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-recursion-by-building-a-decimal-to-binary-converter/64646577f28ade99100a55c3.md @@ -7,9 +7,11 @@ dashedName: step-77 # --description-- -Now your `showAnimation()` function is set up. But if you look closely at your `checkUserInput()` function, you'll notice that it's not very DRY – you're calling `parseInt()` to convert `numberInput.value` into a number several times. +Now your `showAnimation()` function is set up. But if you look at your `checkUserInput()` function, you'll notice that it is calling `parseInt()` to convert `numberInput.value` into a number several times. -A simple way to fix this is to create a new variable to store the converted number. Then you only have to convert the number once and can use it throughout the function. +This is generally a poor practice, for reasons like performance concerns or even just the fact that you'd have to change your logic in multiple places to update the `parseInt()` call. + +To fix this, create a new variable to store the converted number. Then you only have to convert the number once and can use it throughout the function. Create a new variable called `inputInt` and assign it the number converted from `numberInput.value`.