Introduction to JavaScript – Properties. When you introduce a new piece of data into a JavaScript program, the browser saves it as an instance of the data type. An instance is an individual case (or object) of a data type.

JavaScript will save a new piece of data, like ‘Hello‘, as a string instance in the computer’s memory. Another example, the number 40.7, is stored as an instance of the number data type.

An instance, like the string ‘Hello‘, has additional information attached to it.

For example, every string instance has a property called length that stores the number of characters in it. You can retrieve property information by appending the string with a period and the property name:

 console.log('Hello'.length); 

In the example above, the value saved to the length property is retrieved from the string, ‘Hello‘. The program prints 5 to the console because Hello has five characters in it.



Related Videos:

MiltonMarketing.com Related Videos.

Related Links:

JavaScript Glossary

My little pony learning game in VB.NET

Defining What an Application Is

Introduction to JavaScript – Variables: String Interpolation II

Using the Current Year in Your Posts – WordPress

The Python Standard Library Ver 3.6.5

Alignment CSS properties

The background-color CSS property

What is a Shortcode in WordPress?

Introduction to JavaScript – Data Types

Why do most sites use cookies?

Introduction to JavaScript – Control Flow: if/else Statements

HTML paragraph tag: p

Introduction to JavaScript – Variables: Undefined

Object-Oriented Programming (OOP)

CSS, HTML, JAVASCRIPT, Online Compiler. Code on the go by replit.it

Introduction to JavaScript – Review Types and Operators

Understanding Floating point number representation

Learn more about JavaScript Variables

How to make a Go-Back Input button with inline JavaScript

How do I install plugins in WordPress?

Introduction to JavaScript – Variables: String Interpolation

Introduction to JavaScript – Built-in Methods

Learn about Python Generators

Introduction to JavaScript – Create a Variable: const

Introduction to JavaScript – Variables: Review

How to make a go-back button with PHP code?

Introduction to JavaScript – Control Flow

Should I Choose a Hosted or Non-hosted Blogging Platform?

Python Glossary

Who is this Android App Development course for?

Introduction to JavaScript – Create a Variable: let

Introduction to JavaScript – Control Flow: True and False values

FAQs