Code

General Code

Objects

Objects allow the grouping of related information into one unit. An object is created using curly braces. Notice how there is information inside the curly braces. These are in the form of name/value pairs. They are called properties. Properties can hold any type of data. To access these properties, we can use dot-object notation… Happy […]

Objects Read More »

Function Scope

If we create a variable within a block of code, it is scoped to that block. This is different than in C#. Code blocks are marked with curly braces ( { } ). So a function has a block of code because it uses curly braces to define it. Let’s look at the previous code

Function Scope Read More »

Function Return

We have sent values to a function, but what about getting information back? All functions return to the location from which they are called and they return data using the “return” keyword. If you do not use the “return” keyword, the function will return “undefined”. Happy Coding! Clay Hess

Function Return Read More »