The following code creates an Array object letters with elements a, b, and c. The order of the array elements is then reversed using the reverse() method to produce the array [c, b,a].
Ejemplo El siguiente código crea un objeto Array letters con los elementos a, b y c. El orden de los elementos de la matriz se invierte con el método reverse() para generar la Versión del lenguaje
Other results
Therefore, the code above creates an array of objects, each containing an id property, just like a MediaDTO instance.
Por lo tanto, el código anterior crea una matriz de objetos, que contienen una propiedad id, como una instancia de MediaDTO.
The following code takes an array of objects and creates a new array containing the newly reformatted objects.
The following code creates an empty Array object users and the array is then populated using four calls to push().
El siguiente código crea el objeto Array vacío users, que luego se llena mediante cuatro llamadas al método push().
The following code creates an empty Array object letters and then populates the array with the elements a, b, and c using the push() method.
Véase también Ejemplo El siguiente código crea un objeto Array letters y llena la matriz con los elementos a, b y c utilizando el método push().
To demonstrate this we'll quickly create a simple Rack application by passing in the environment hash to a new proc object and return an array with a status code, an (empty) hash of headers and some simple body content.
Como demostración, vamos a crear una aplicación Rack sencilla pasándole el hash de entorno a un nuevo objeto proc, devolviendo un array con un código de estado, un hash de cabeceras vacío y el contenido.
The following code creates a Function object that takes two arguments.
El código siguiente crea un objeto Function que toma dos argumentos.
This time i really tried to create object oriented code.
Examples are used only to help you translate the word or expression searched in various contexts. They are not selected or validated by us and can contain inappropriate terms or ideas. Please report examples to be edited or not to be displayed. Potentially sensitive, inappropriate or colloquial translations are usually marked in red or in orange.