# Funciones

El concepto de funciones se concibe con la finalidad de establecer mecanismos que permitan ser invocados de manera simple, eliminando la necesidad de especificar la ubicación de los archivos involucrados.

Existe un directorio dedicado a almacenar las funciones ubicada en la raiz del directorio (\~/functions) dentro debemos almacenar archivos con extencion js como por ejemplo "console.log.js"\
\
El contenido de este no difiere de una funcion con su export.<br>

{% code title="console.log.js" fullWidth="false" %}

```javascript
exports.con = (data) => {
    console.log(data)
}
```

{% endcode %}

La forma de poder invocar esta funcion es con un metodo global&#x20;

```
fun['console.log'].con("Hola")
```

En cualquier parte donde se invoque con esta metodologia, se ejecutra la funcion como se halla programado.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://agustin-fernandez.gitbook.io/monointegrator/primeros-pasos/funciones.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
