Hello guys, I been trying for 3 days making this code to work but cleared I couldnt pass trough this step so I was wondering if anyone could teach me how to create an “if” statement that activates with ceratins numbers.
let arr =[];
for(i=1;i<=15;i++)
arr.push(i);
for(let i=0;i < arr.length;i++)
{
if (arr[i] >= 3 && arr[i] <= 7)
{console.log(arr[i]);
}}
Now, I have another problem xD. See, now I have use the same code but in this case it suppost the code have to shows certain values: 1,2,8,10,10,11,12,13,14,15. How? I dont know
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.