Skip to content

Instantly share code, notes, and snippets.

@mackenco
Created February 4, 2017 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mackenco/3635867427df3860b72d72a9cdc9c751 to your computer and use it in GitHub Desktop.
Save mackenco/3635867427df3860b72d72a9cdc9c751 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=3635867427df3860b72d72a9cdc9c751
<!DOCTYPE html>
<html>
<head>
<title>Parts of Speech: We Do</title>
</head>
<body>
<h1 id = "header">This is a page about the parts of speech</h1>
<h1 id = "noun"> This is a noun --> </h1>
<h1 id = "noun2"> This is a DIFFERENT noun --> </h1>
<h1 id = "adj"> This is a adjective --> </h1>
<h1 id = "verb"> This is a verb --> </h1>
<div id ="sentence"></div>
</body>
</html>
{"enabledLibraries":["jquery"]}
/*
DO NOW: Variable Practive
*/
// Update the value of the noun variable so you see something on the page
var noun = '';
$('#noun').append(noun);
// Uncomment out the code below. What do you need to add to make it work?
//$('#adj').append(adjective);
// Declare a variable called verb and append it to the h1 with the id 'verb'
// *Reassign* the variable 'noun' so the HTML makes sense
$('#noun2').append(noun);
// What is the difference between creating a variable and assigning a variable?
// Uncomment out the below code and see what it does. There are things here you haven't
// seen yet. What do you think they're doing? What is the result in the HTML?
//$("#sentence").html(`I ${verb} the ${adjective} ${noun}`);
#header{
color: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment