Start with Python
This commit is contained in:
18
2- javascript/1-js-variables/README.md
Normal file
18
2- javascript/1-js-variables/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
Javascript Variables, Lists, and Objects
|
||||
========================================
|
||||
|
||||
Create a variable named byte and set it equal to "school".
|
||||
|
||||
Create an array named instructors and have it contain the strings "Armen", "Chris", and "Greg"
|
||||
|
||||
Create an array named students and have it contain the strings "Adolfo", "Benny", "Billy", "Brendan"
|
||||
|
||||
Create an object with the following key-value pairs- "byteAcademy":byte, "instructors":instructors, "students":students
|
||||
|
||||
Append the contents of the object to the "printout" div element. It should read like this:
|
||||
|
||||
byteAcademy - School
|
||||
|
||||
instructors - Armen, Chris, Greg
|
||||
|
||||
students - Adolfo, Benny, Billy, Brendan
|
18
2- javascript/1-js-variables/index.html
Normal file
18
2- javascript/1-js-variables/index.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!doctype HTML>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="reset.css">
|
||||
<link rel="stylesheet" type="text/css" href="main.css">
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class = "container">
|
||||
<nav id="top">
|
||||
<h1>Javascript Variables and Objects</h1>
|
||||
</nav>
|
||||
<div id = "printout"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
36
2- javascript/1-js-variables/main.css
Normal file
36
2- javascript/1-js-variables/main.css
Normal file
@ -0,0 +1,36 @@
|
||||
body{
|
||||
background-color: #D1D1D1
|
||||
}
|
||||
|
||||
nav{
|
||||
position: absolute;
|
||||
background-color: black;
|
||||
width: 100%;
|
||||
height: 4em;
|
||||
top: 0;
|
||||
text-align: center;
|
||||
line-height: 4em;
|
||||
}
|
||||
|
||||
nav h1{
|
||||
font-size: 3em;
|
||||
font-family: monospace;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#printout{
|
||||
width: 800px;
|
||||
min-height: 1000px;
|
||||
background-color: white;
|
||||
margin: 5em auto 0 auto;
|
||||
color: black;
|
||||
text-indent: 1em;
|
||||
}
|
||||
|
||||
#printout p{
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
#printout p:nth-child(even) {
|
||||
background-color: #D1D1D1;
|
||||
}
|
8
2- javascript/1-js-variables/main.js
Normal file
8
2- javascript/1-js-variables/main.js
Normal file
@ -0,0 +1,8 @@
|
||||
// set your variables below
|
||||
|
||||
// all jquery dom actions can only be called inside document ready. Print your variables
|
||||
// inside document ready.
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
})
|
47
2- javascript/1-js-variables/reset.css
Normal file
47
2- javascript/1-js-variables/reset.css
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
|
||||
* http://cssreset.com
|
||||
*/
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
Reference in New Issue
Block a user