JavaScript Colons

By: Dusty Arlia
Published on Friday, June 7, 2013, 08:06 PM
Last Updated on Saturday, July 11, 2015 at 6:49 PM
Total Updates: 2

Colons (:) act like delimiters in object literals. Objects are defined with the colon delimiting the identifier for the property and its value. Here is an example:

var employee = {
first_name      : "Justin",
last_name       : "Bieber",
employee_number :  0001
};

Comments:

Ad: