Here is a piece of code I wrote, my colleagues changed my code in another way, Can I ask whether these two methods have the same efficiency?I think they have the same efficiency.Which is better?
My Function
<script>
var $count = $("#count");
function(){
var i=0,j=0;k=0,count =0;
for(i;i<10;i++){
for(j;j<100;j++){
for(k;k<1000;k++){
$count.text(count++);
}
}
}
</script>
The Other Function
<script>
var $count = $("#count");
function(){
var i=0,j=0;k=0,count =0,
tempCount= $count ;
for(i;i<10;i++){
for(j;j<100;j++){
for(k;k<1000;k++){
tempCount.text(count++);
}
}
}
</script>