Error in 'Waypoint: Iterate Odd Numbers With a For Loop'
See original GitHub issueThe code that appears when this waypoint loads is the answer to the challenge.
Let’s change our initialization and final-expression so we can count by odd numbers. Push the odd numbers from 1 through 9 to myArray using a for loop.
var ourArray = [];
for(var i = 1; i < 10; i += 2){
ourArray.push(i);
}
var myArray = [];
// Only change code below this line.
// Only change code above this line.
if(typeof(myArray) !== "undefined"){(function(){return myArray;})();}
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Error in 'Waypoint: Iterate Odd Numbers With a For Loop' #3966
The code that appears when this waypoint loads is the answer to the challenge. Let's change our initialization and final-expression so we can ......
Read more >Basic JavaScript Lesson: Iterate Odd Numbers With a For Loop
Certification: JavaScript Algorithms and Data StructuresCourse: Basic JavaScriptLesson: Iterate Odd Numbers With a For LoopfreeCodeCamp ...
Read more >What is wrong with my for loop? All odd numbers are not ...
The problem here is that you are removing elements while you are looping over the list. So, when you remove the item at...
Read more >range - Functions - Configuration Language | Terraform
range Function. range generates a list of numbers using a start value, a limit value, and a step value.
Read more >3xu5tycqp - Java - OneCompiler
Main.java:2: error: class, interface, or enum expected (function(t) ... is even number"); } else { System.out.println("i is odd number"); } ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the point of this bug is that the rest of the waypoints don’t generally have the example code using
ourArray
be the exact same code you need to do withmyArray
. There’s usually some subtle difference between the two. In the one you could just copy and paste it and changeour
tomy
.removed solution by mod