Skip to content

Instantly share code, notes, and snippets.

View behtea's full-sized avatar

Muhammad Ariel Akilie behtea

View GitHub Profile
var myDogs = [
{
name: 'Henry',
age: 0.5,
breed: 'Aussie',
food: 'kibble',
toys: ['tennis ball', 'chew toy'],
picture: 'http://rubyriverminiaustralianshepherds.com/wp-content/uploads/aussie-puppy-for-sale-940x412.jpg'
},
{
var car = {
type: "Honda Civic",
location: 1,
move: function(){
var prev = car.location;
car.location = car.location + 1;
console.log(car.type + " is moving from " + prev + " to " + car.location);
}
};
var carFactory = function (type, speed) {
var car = {};
car.location = 1;
car.type = type;
car.speed = speed;
car.move = function () {
var prev = car.location;
car.location = car.location + 1;
<body style="background-color:lightgrey">
<h1 style="color:blue">This is a heading</h1>
<h1 style="color:#AA22FF">Also a heading</h1>
<h1 style="color:rgb(0,255,255)">Moar!!</h1>
<p style="color:red;background-color:green">This is a paragraph.</p>
<img src="https://i.imgur.com/81qyN1y.jpg" style="height:100px;width:100px">
</body>
<html>
<head>
</head>
<body>
<h1 style="font-family:verdana;color:orange;">This is a heading</h1>
<p style="color:green;">This <i style="color:orange;font-size:300%">is</i> a paragraph.</p>
<p style="color:green;">This <i style="font-size:300%;">is</i> a paragraph.</p>
<p style="color:green;font-size:300%;text-align:center;font-family:'Times New Roman';">This is by far the most important part of the page!</p>
</body>
</html>
<html>
<head>
<style>
h1 {
font-family: verdana;
}
p {
color: green;
}
i {
<html>
<head>
<style>
h1 {
font-family: verdana;
}
p {
color: green;
}
i {
<html>
<head>
<style>
h1 {
font-family: verdana;
}
p {
color: green;
}
i {
<html>
<head>
<style>
h1 {
font-family: verdana;
}
p {
color: green;
}
.big {
<div id="greeting" class="section">
<h1>Hello!</h1>
<p>This content is all related!</p>
<p>Nice that we can group it using a "div" tag!</p>
</div>