//array
var groceries = ['apples', 'bananas', 'oranges'];
var fruit = groceries[1];
//array and if statement
var answer = pickRandom(['heads','tails']);
print(answer);
if(answer === 'heads')
drawBoxes('gwg ggg gwg');
if(answer === 'tails)
drawBoxes('ggg wgw wgw');
=== 인 점!
'JavaScript > GrassHopper' 카테고리의 다른 글
[D1] Drawing shape (0) | 2022.04.23 |
---|