Daily Journal Final Project

Daily Journal for final project

by Justin Hale

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<html>

  <head>
    <title>Final Project</title>
  </head>

  <body>
    <h1>-Daily Journal-</h1>
    <script>


    </script>
  </body>

</html>

JavaScript

//Daily Journal: Generates daily entries with set of properties. 
//Can view all entries by running "entryLog();"

//Constructor notation utilized to create template for new Entries.
//This works great for manually adding entries. 	
function Entry(name, date, currentMood, appreciationList, goals, lessonsLearned){
	this.name = name; //Entry name, use following construct: ie. "entry #1"
	this.date = date; //Date of journal entry
	this.mood = currentMood; //Mood day of journal entry
	this.appreciations = appreciationList; //List (preferably 3) things you are thankful for
	this.goals = goals; //Current goals of yours; short or long term
	this.lessons = lessonsLearned; //Lessons learned that day, could be a quote
	}

//First journal entry	
var entry1 = new Entry(
	"entry #1",
	"December 15, 2016",
	"happy",
	"Thankful for my life in general; very blessed",
	"Finish the project I am working on",
	"Be patient and take my time");

//Array to hold journal entries and display entry properties when entryLog(); is ran	
var journal = [entry1];
function showEntry(entry){
	console.log("Entry Number: " + entry.name);
	console.log("Today's Date: " + entry.date);
	console.log("My Mood: " + entry.mood);
	console.log("My Appreciations: " + entry.appreciations);
	console.log("My Goals: " + entry.goals);
	console.log("My Lessons Learned: " + entry.lessons);
	}

//Function that loops through journal compiling all journal entries into one entryLog
function entryLog(){
	for(var i = 0; i<journal.length; i++){
	showEntry(journal[i]);
	}
 }

//Second journal entry
var entry2 = new Entry(
	"entry #2",
	"December 16, 2016",
	"pretty good",
	"Weather's good, had a good breakfast, almost Christmas",
	"Finalize this project",
	"Be slow to speak and quick to hear");

//Added entry to journal array
journal.push(entry2);

//Add function is a secondary option for adding entries via prompted text boxes.
//Also allows for there to be a reference point for the interactive text boxes below.
function...