JavaScript Practice 2

In this example below you will see how to do a JavaScript Practice 2 with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 210296, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 210296 ©
  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>JavaScript Practice 2</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <button onclick="lol()">Click here to begin!</button> 

<button onclick="uhhh()">This is going to be harder than I thought</button>

<button onclick="yay()">It's getting better</button>
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/210296/javascript-practice-2-qZrXJb */
button{
  background-color:white;
}

/*Downloaded from https://www.codeseek.co/210296/javascript-practice-2-qZrXJb */
var x = "This is a variable";
var y= 12;
function funky(){
var name = prompt("Hello, what is your name?");
  alert("Hello," + name+ "thanks for playing");
  var first= prompt("What's the first number?");
  var second= prompt("What is the second number?");
  alert(first+second);
}

function uhhh(){
  var help = prompt("I'm like totes confused, please help?")
  alert("Thanks" + help);
}

function yay(){
  var haha = prompt("I like totes think this is getting better...")
  alert("HAHA")
}

function lol() {
  var name = prompt("What is your name?");
  if(name === "Will"){
    alert("Hi, bro!");
  }
  else{
    alert("You ain't Will!!!")
  }
}

function test(){
  var points = 0;
  var name = prompt("What is your name?");
  if(name === "Mr. Lea"){
    var points = points + 1;
  
  alert("Welcome"+ name)
  alert("You have"+ points +"point(s)");
}//this is where your if statement ends
else{
  alert("This is hard");
  function other(){ 
    var points = 0;
}//this is where the else ends
}//this is where your functions

Comments