I'm beginner at JavaScript and I need some help with this. Let's say a user has to enter a number from the HTML form. Then in another function there is a calculation, but when I'm calling the other function I'm getting NaN. This is my function when I'm entering the number, and if I output this I'm getting the calculated result.
const enterNumbers = number => {
if (number < 10000) {
return 0.062 * number;
} else {
return 0.062 * 20000;
}
If I output this in a third function let's say
const display = () => {
console.log (enterNumbers((number)));
I'm getting the result, but then in another function I want to make some calculation with the number calculated from the enterNumbers function
const calculation = () => {
return enterNumbers * 10;
}
and then when I call the second function in the display function I'm getting a NaN.