Skip to content

Instantly share code, notes, and snippets.

@becsegal
Created July 10, 2017 21:31
Show Gist options
  • Select an option

  • Save becsegal/73aad73a5f55e8a9705599e7f56306b3 to your computer and use it in GitHub Desktop.

Select an option

Save becsegal/73aad73a5f55e8a9705599e7f56306b3 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=73aad73a5f55e8a9705599e7f56306b3
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p id='artist'></p>
<p id='title'></p>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
</body>
</html>
function display(key, value) {
$('#' + key).html(key + ": " + value);
}
var song = {
title: 'Despacito',
artist: 'Luis Fonsi & Daddy Yankee Featuring Justin Bieber'
};
// Call display to show the title
// Use square brackets + var syntax
// Call display to show the artist
// Use square brackets + var syntax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment