So, I think I should mention that pretty much all of my js knowledge is the knowledge that Codecademy could give, for those who know it. JSHint said that everything looked fine once I fixed some of my other issues, but when I run it, only the prompt works, then the screen just sits there blankly.
<!DOCTYPE html>
<html>
<body>
<script type = "text/javascript">
var color = prompt("What is your favorite color");
if(color == "yellow"){
console.log("I see you have good taste");
}
else{
console.log("That color sucks");
}
</script>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire