Well,I went for interview today and there Interviewer asked me a question and it's like this.
let a = "Aditya";
1.for (let i=0; i<a.length; i++)
2.for(let i=a.length; i>0; i--)
3.for(let i=0, length=a.length; i<length; i++)
which of the above for loop runs faster 1 , 2 , 3? Arrange it, and give the reason as well. I was like well I used (1) most the so it could be the faster one but he told me I was wrong and I tried google couldn't find any helpful solution.Please help me out.