Skip to main content
fixed grammar
Source Link
Xandor
  • 194
  • 6
var mayTodoAppmyTodoApp = new todoApp();

Then Youryour jQuery call after that, outside of your constructor, not in:

It is defined inside of curly brackets { } the key is a name to reference the value, and does not need quotes. The value needs quotes unless you want to use a variable. Also numbers do not need quotes for the values. Values can be objects or arrays as well. And the pairs are delimited by a comma ,. As long as you follow these rules javascript does the rest.

var mayTodoApp = new todoApp();

Then Your jQuery call after that, outside of your constructor, not in:

It defined inside of curly brackets { } the key is a name to reference the value and does not need quotes. The value needs quotes unless you want to use a variable. Also numbers do not need quotes for the values. And the pairs are delimited by a comma ,. As long as you follow these rules javascript does the rest.

var myTodoApp = new todoApp();

Then your jQuery call after that, outside of your constructor, not in:

It is defined inside of curly brackets { } the key is a name to reference the value, and does not need quotes. The value needs quotes unless you want to use a variable. Also numbers do not need quotes for the values. Values can be objects or arrays as well. And the pairs are delimited by a comma ,. As long as you follow these rules javascript does the rest.

fixed grammar
Source Link
Xandor
  • 194
  • 6

First when defining a class you do not need the beginning ( and ending )(); What that is for is to create a nameless function that will then be run once and then for all intensiveintents and purposes be removed from memory after. You are wanting to create a class that can be referenced and used later on. Simply:

First when defining a class you do not need the beginning ( and ending )(); What that is for is to create a nameless function that will then be run once and then for all intensive purposes be removed from memory after. You are wanting to create a class that can be referenced and used later on. Simply:

First when defining a class you do not need the beginning ( and ending )(); What that is for is to create a nameless function that will then be run once and then for all intents and purposes be removed from memory after. You are wanting to create a class that can be referenced and used later on. Simply:

added 946 characters in body
Source Link
Xandor
  • 194
  • 6

EDIT: I also just noticed your JSON objects. You do not need to define then in that manner. Javascript automatically determines variable type which is why you use var instead of char and int and such. For this same reason JSON objects are automatically defined by format. It's a harder concept for some to grasp at first and I would definitely read more into it but basically it is an associated array, or array of pairs (keys and values). that is in this format:

{key: 'value', key: 'value'}

It defined inside of curly brackets { } the key is a name to reference the value and does not need quotes. The value needs quotes unless you want to use a variable. Also numbers do not need quotes for the values. And the pairs are delimited by a comma ,. As long as you follow these rules javascript does the rest.

var home = '1234 Fake St.';
var example = {date: '12/01/2016', time: '9:42am', location: home, peopleAttending: 10};

EDIT: I also just noticed your JSON objects. You do not need to define then in that manner. Javascript automatically determines variable type which is why you use var instead of char and int and such. For this same reason JSON objects are automatically defined by format. It's a harder concept for some to grasp at first and I would definitely read more into it but basically it is an associated array, or array of pairs (keys and values). that is in this format:

{key: 'value', key: 'value'}

It defined inside of curly brackets { } the key is a name to reference the value and does not need quotes. The value needs quotes unless you want to use a variable. Also numbers do not need quotes for the values. And the pairs are delimited by a comma ,. As long as you follow these rules javascript does the rest.

var home = '1234 Fake St.';
var example = {date: '12/01/2016', time: '9:42am', location: home, peopleAttending: 10};
Source Link
Xandor
  • 194
  • 6
Loading