Skip to content

Instantly share code, notes, and snippets.

@evadav
Created May 5, 2019 21:52
Show Gist options
  • Save evadav/a388d4d2fcfa195cc72f12921452b709 to your computer and use it in GitHub Desktop.
Save evadav/a388d4d2fcfa195cc72f12921452b709 to your computer and use it in GitHub Desktop.
Display a potatoes stack
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script>
var patata = confirm('Hey my friend, do you like potatoes?');
if (patata === true){
var string ="#";
for (var i= 0; i<=7; i++){
var result = string.repeat(i)
console.log (result)}
} else {
console.log('Sorry, i am not sure')
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment