You expected one output but called console.log twice. If you call it twice you’ll get two outputs. If you only expected one, delete one of them. Which one should be deleted? That depends on how you intend for your function to behave, and then you would adjust the rest to fit together with that.
Sure in some sense you’re nesting things but isn’t that a bit vague? You can fit things together however you want, but you the programmer are the one who has to make sure that they line up with each other in a useful way. Is it nested? In what way? One happens before the other, isn’t that sequential?
If you were to blame any one single thing then it would be this:
return console.log('User input is wrong');
What is the meaning of that return value? Which value are you using? Is your function supposed to both print and return something? Usually it’s one or the other, but either way there needs to be some intention behind it and this seems to lack some of that.