Updated: 05/05/2017 by Computer Hope

A nest may refer to any of the following:

nesting1. Nesting is a term used to describe the placement of one or more objects within another object. For example, when referring to a computer, nesting may refer to inserting a graphic image into a word processor.

2. With computer programming, A nested function is a function contained inside of another function within the source code of a program. An example of this in JavaScript is shown below.

function outerFunction() {
function innerFunction() {
// code

Typically, this nesting is done to limit the scope of the inner function (the inner function can only be called by the function containing it or another function within the containing function). In the example above, outerFunction() could call innerFunction(), but innerFunction() could not be called from the global scope or from any function outside of outerFunction().

This type of nesting helps to keep the inner functions from being altered or overwritten by code in the global scope or code within functions that are outside of the containing function.

With HTML, XML, and other markup languages nesting is the data between the opening and closing tags. For example, with the XML code shown below "computersoftware" is the root tag which contains all other XML information. The "product" tag nests all of the product information and "name", "description", "developer", and "cost" all nest information relating to each tag.

<name>Windows 8</name>
<description>Microsoft Windows 8 operating system - Full version.</description>

3. The term Nest may also refer to the Nest Learning Thermostat.

Object, Programming terms