Question: 6. Fix the broken code, provide comment(s) as to what was wrong with the original code: for(let i=0; i > 5; i++) { console.log(i) }

6. Fix the broken code, provide comment(s) as to what was wrong with the original code:

for(let i=0; i > 5; i++)

{ console.log(i) }

function addIfEven(num)

{ if(num % 2 = 0) { return num + 5 }

function loopToFive()

{ for(let i=0, i < 5, i++) { console.log(i) }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!