0
How to make an output true this "xoxoxoxoxo" where x & o must to be 5, with loops and conditional statement in java script?
Java script
7 ответов
+ 6
Defri Chandra JaScript , please help us to keep sololearn what it is made for: It is a self-learning platform. So this means, that we should avoid giving codes when people ask for this, before they have done a try by themselves and before they have present it here.
It looks really helpful when you post a (really nice) code as you did, but it does not help the OP. This will be a copy and paste for him - and the coding skills and problem solving ability of the OP will not grow.
What we should do is to give hints or comments how to solve the task.
Thanks for your understanding.
+ 2
let s = ""
for(let i=0;i<10;i++){
if(i%2===0)
s += "o"
else
s += "x"
}
console.log(s)
+ 1
0
Not like that
0
X & O must equal 5 and the output true
0
X & O can't less & more than 5
0
I stuck bro so i ask here azz