js conversations

ello Developers,

Anyone posting these Questions on the community and those having Doubts in the question can reply in the same thread.

I humbly request that everyone try these questions on pen and paper and don’t use a compiler.

The practice Community Questions for today’s class are:-

  1. What does the “continue” keyword do inside a loop?

A. Skips the current iteration and moves to the next one

B. Exits out of the loop

C. Both of the above

function foo() {

let a = 0;

let b = 0;

a++;

return a;

}

foo();

console.log(typeof a);

console.log(typeof b);

const clothes = [‘jacket’, ‘t-shirt’];

clothes.length = 0;

console.log(clothes[0]);

const length = 4;

const numbers = [];

for (var i = 0; i < length; i++){

numbers.push(i + 1);

}

console.log(numbers)

const length = 4;

const numbers = [];

for (var i = 0; i < length; i++) {

}

numbers.push(i + 1);

console.log(numbers);

1 Like

Whoa @jmonika715 , thank you for sharing these questions! I hope to see your batchmates interacting with you on here!

  1. Skips the current iteration and moves to the next one
  2. string ,undefined
  3. undefined
  4. [1,2,3,4]
    5 .[5]
1 Like

Great work @manishamahale1720 :grin:!