Objects Menu

Author: Java-admin

By Value Vs By Reference

Author: Java-admin

Expression

Objects and Functions

Author: Java-admin

In Javascript Objects and Functions are relate. In many ways they are the same subject
because Objects are objects and functions are object too.

Read more

Objects And Object Literals

Author: Java-admin

Object Literals

Now, there’s a short-hand on creating an Object by using the curly brackets “{}”.

This is not an operator – what happens is that when the JS engine is parsing and it comes across the curly brackets ‘{}’ it knows that this is a shorthand for an ‘Object’. That you want to create an ‘Object Literal’. This is the better way of creating an ‘Object’.

Read more

Faking Namespaces

Author: Java-admin

Namespaces

Namespace is a container for variables and functions. Typically to keep variables and functions with the same name separate.

Javascript does not have a ‘Name Spaces’, but because of ‘Object Literals’ we can fake it.

Read more

JSON and Object Literals

Author: Java-admin

Javascript Object Notation

JSON is inspired by the ‘Object Literal’. They are not the same thing. They look alike.

Read more

Functions and Objects

Author: Java-admin

First Class Functions is everything you can do with other types you can do with functions.

In JS functions are objects and you can assign them to a variable, pass it to a function and create them on the fly.

Read more

Functions Statement and Function Expressions

Author: Java-admin

Expression

A unit of code that results in a value. It does not have to save to a variable.

Any expression in JS ends up returning a value.

Read more