1. While We're at it...WHy does the variable line repeat twice?


#1

https://www.codecademy.com/courses/javascript-beginner-en-ASGIv/0/1?curriculum_id=506324b3a7dffd00020bf661


Replace this line with your code. 

var coinFace = Math.floor(Math.random() * 2);

while(coinFace === 0){
	console.log("Heads! Flipping again...");
	*****var coinFace = Math.floor(Math.random() * 2);***** Why does this line state twice
}
console.log("Tails! Done flipping.");


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.