Created
May 2, 2017 01:25
-
-
Save venkat/87c281be495027b8399bff852e55af01 to your computer and use it in GitHub Desktop.
Exported from Popcode. Click to import: https://popcode.org/?gist=87c281be495027b8399bff852e55af01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
</head> | |
<body> | |
<p> | |
The length of the array is: <span id="len"></span> | |
</p> | |
<p> | |
A random whole number between 0 and length of the array is: <span id="rand"></span> | |
</P> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"enabledLibraries":["jquery"]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stuff =[47, "hello", false, null, 12, 97, 800, "ScriptEd", "pencil", 2, 6876, 2016, 15, "Justin Beiber", "water bottle", "phone", 4.13, 76, 90, 81, "world", "sting", 65, 37, 82, "bye", "New York", "laptop", "A", "Z", 34, 809, 789, 43, 56, "T", "O", 25, "JavaScript", "notebook", 765764, 19873]; | |
//Challenge 1: Use the jquery $(selector).append() to append the length of the array | |
//to the id #len | |
//Challenge 2: Generate a random whole number between 0 and the amount of items in this array. Use the jquery $(selector).append() to append that number to the id #rand |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment