Skip to content
Advertisement

Tag: loops

What am doing wrong in here?

Input value always gets into if condition first even am parsing it to parseInt() and when page refreshed with a number it gets into else condition, like its not registering the inputValue at first place, also if i add a submit event rather an click one event doesnt fires up. Answer You’re recording the value of the input on page

Index Values SumUp to Total

I am trying to improve in my Problem Solving Skills and would love to get some explanation on what it is that I am doing wrong or if I can get a hand in the right direction. My code below is what I am stuck on. My problem, I am trying to check within the array if it contains any

Array item gets the value “undefined”

I am trying to create an array of unique numbers from 0 to 10: But the output of the array will always have an undefined item at a random index which I don’t know why. Can somebody help me out? Answer If the new Set removes a duplicate, then i will be larger than the length of numbers, due to

Using a for loop with a function in Javascript [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I am having trouble figuring out how to solve this challenge below: Challenge: droids Complete the function droids that accepts

Advertisement