Skip to content

Print a string from n through 1 using recursion

I’m trying to print a string from number n through 1 using this recursive function: I know changing the lines 7 and 8 to return outputStr + n + numStr(n-1) does the job. But I can’t figure out why the above code doesn’t work as expected. It prints ‘1’ in all cases. Answer When n!…

Manipulating array and finding path

I am working on a angular application. My data is as follows : if All the elements are checked then resultArray will be as parentId === null, resultArray = [2] // if for any element checked flag is true and parentChecked flag is also true, then I need to comapare parentId of that element with objectId of elem…

Logo float on basic responsive nav

Problem ” float: right” poorly working in responsive class Basically, I am trying to place my image logo in the right-up corner for a semi-lang case but every manipulation on .logo force navigation bar to change its values. Question How can I align the logo to the right-up corner? What I’ve …

Variable not displayed in console.log

here is my code. expected output actual output Why is it showing ‘undefined` ? Answer you are trying to assign the console.log to userName and using it. change the code to or you can use the line as follows.

How to loop so I can separate 2 values? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I’m trying to make an inventory system as part for my e-commerce project so I need to g…