Ejercicio: Nombra correctamente según su tipo de dato

7/24

Lectura

Ya aprendiste como nombrar correctamente tus variables según el tipo de dato que representen, así que ahora ponte a prueba. Te dejaré a continuación una lista de variables con nombres mal definidos y tú en los comentarios tendrás la misión de resolver de acuerdo a las reglas de nomenclatura cómo deberían de ser llamadas correctamente.

...

Regístrate o inicia sesión para leer el resto del contenido.

Aportes 99

Preguntas 0

Ordenar por:

¿Quieres ver más aportes, preguntas y respuestas de la comunidad?

Tarjetita Antispoiler, dale ❤ para que vaya hasta arriba y no spoilemos futuros alumnos que quieran intentar el ejercicio por favor 😁
Mi solución más abajo 👇
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

//Arrays:
const numberList = [1, 2, 3, 4, 5];
const nameList = ['Cande', 'Alex', 'Mariana'];
const colorList = ['red', 'green', 'blue'];

//Booleanos:
const isActive = true;
const isCorrect = false;
const canWrite = true;
const hasUser = false;

//Números:
let totalResult = 3543;
const minNumber = 20 //Me tomé la libertad de elegir el sufijo "min" al no tener más contexto. 
const PI = 3.14159 //Considero que es correcto así.

//Funciones:
sendAlert()
createObject()
setPassword()
getResults()

//Clases:
class School {} //Considero que es correcto así.
class Service {}
class Account {}

Mis aportes:




Booleanos
// const active = true
const isActive = true
// const correct = false
const isCorrect = false
// const write = true
const canWrite = true
// const user = false
const hasUser = false

Números
// let result = 3543
let positionZ = 3543
// const y = 20
const positionY = 20
const PI = 3.14159

Funciones
// sendAlertIfIsEmpty()
sendAlert()
// ifNotExistCreateNewObject()
createObject()
// password()
setPassword()
// results()
getResults()

Clases
// class School {}
class School {}
// class NewService {}
class Service {}
// class ImplementNewAccount {}
class Account {}

`const numbersList = [1, 2, 3, 4, 5`] `const namesList = ['Cande', 'Alex', 'Mariana'`] `const colorsList = ['red', 'green', 'blue'`] ## Booleanos `const isActive = true` `const isCorrect = false` `const canWrite = true` `const hasUser = false` ## Números `let total = 3543` `const minNumber = 20` `const PI = 3.14159` ## Funciones sendAlertI() createNew() validatePassword() calculateResults() Clases `class School `{} `class Service `{} `class Account{}`
`const ejeX = [1, 2, 3, 4, 5`] `const nameList = ['Cande', 'Alex', 'Mariana'`] `const colorsList = ['red', 'green', 'blue']` // `const isActive = true` `const isCorrect = false` `const hasWrite = true` `const isUser = false` // `let totalResult = 3543` `const Y = 20` `const PI = 3.14159` // `class School `{} `class NewService `{} `class NewAccount {}` // sendAlert() createObject() passwordDecrypt() `showResults()`
Yo les pondría los siguientes nombres. ``` const x = \[1, 2, 3, 4, 5] // numbers. const name = \['Cande', 'Alex', 'Mariana'] // peopleNames. const colors = \['red', 'green', 'blue'] // colors. const active = true // isActive. const correct = false // isCorrect. const write = true // canWrite. const user = false // isUser o hasUser. let result = 3543 // result o total const y = 20 // referenceNumber const PI = 3.14159 // PI sendAlertIfIsEmpty() // sendAlert ifNotExistCreateNewObject() // createObject password() // getPassword results() // getResults class School {} // School class NewService {} // Service class ImplementNewAccount {} // Account ```
Respuesta Arreglos ```js const numberList = [1, 2, 3, 4, 5] const userNames = ['Cande', 'Alex', 'Mariana'] const colorsList = ['red', 'green', 'blue'] ```Booleanos ```js const isActive = true const isCorrect = false const hasWrite = true const hasUser = false ```Números ```js let TotalResult = 3543 const maxNumber = 20 const minNumberPI = 3.14159 ```Funciones ```js sendAlertI() createObject() getPassword() setResults() ```Clases ```js class School {} class Service {} class NewAccount {} ```
```js //Arrays const x = [1, 2, 3, 4, 5] const name = ['Cande', 'Alex', 'Mariana'] const colors = ['red', 'green', 'blue'] //Arrays Correction const numbersList = [1, 2, 3, 4, 5]; const namesList = ['Cande', 'Alex', 'Mariana']; const colorsList = ['red', 'green', 'blue']; // Booleans const active = true const correct = false const write = true const user = false // Booleans Correction const isActive = true; const isCorrect = false; const canWriting = true; const hasUserActive = false; // Number let result = 3543 const y = 20 const PI = 3.14159 // Number Correction let calculationResult = 3543; const minNumber = 20; const piValue = 3.14159; // functions sendAlertIfIsEmpty() ifNotExistCreateNewObject() password() results() // functions Correction sendAlert(); createObject(); generatePassword(); getResult(); // Class class School {}; class NewService {}; class ImplementNewAccount {}; // Class Correction class SchoolClass{}; class NewServiceClass{}; class ImplementNewAccountClass{}; ```*//Arrays* *const x = \[1, 2, 3, 4, 5]const name = \[*'Cande'*,* 'Alex'*,* 'Mariana'*]const colors = \[*'red'*,* 'green'*,* 'blue'*]* *//Arrays Correction* *const numbersList = \[1, 2, 3, 4, 5]*; *const namesList = \[*'Cande'*,* 'Alex'*,* 'Mariana'*]*; *const colorsList = \[*'red'*,* 'green'*,* 'blue'*]*; *// Booleansconst active = trueconst correct = falseconst write = trueconst user = false* *// Booleans Correction* *const isActive = true*; *const isCorrect = false*; *const canWriting = true*; *const hasUserActive = false*; *// Number let* result *= 3543const y = 20const PI = 3.14159* *// Number Correction* *let* calculationResult *= 3543*; *const minNumber = 20*; *const piValue = 3.14159*; *// functionssendAlertIfIsEmpty*()*ifNotExistCreateNewObject*()*password*()*results*() *// functions Correction* *sendAlert*();*createObject*();*generatePassword*();*getResult*(); *// Classclass* School {};*class* NewService {};*class* ImplementNewAccount {}; *// Class Correction* *class* SchoolClass{}; *class* NewServiceClass{}; *class* ImplementNewAccountClass{};
// Arrays const numbers = \[1, 2, 3, 4, 5]; const namesList = `['Cande', 'Alex', 'Mariana']`; const colors = `['red', 'green', 'blue']`; // Booleans `const isActive = true;` `const isCorrect = false;` `const canWrite = true;` `const hasUser = false;` // numbers let totalResult = 3543; const positionY = 20; const PI = 3.14.159; // functions sendAlert(); createObject(); setPassword(); getResults(); //class class School {} class Service {} class Account {}
`//Arrays` `const listOfNumbers = [1, 2, 3, 4, 5]` `const listOfNames = ['Cande', 'Alex', 'Mariana']` `const listOfColors = ['red', 'green', 'blue']` `//Booleans` `const isActive = true` `const isCorrect = false` `const canWrite = true` `const isUser = false` `//Numbers` `let `resultTotal` = 3543` `const sideValue = 20` `const valuePI = 3.14159` `//Functions` sendNotification() buildNewObjectst() getPassword() `getResults()` //Clases `class Students `{} `class ServiceManager `{} `class `AccountManager` {}`
**Arreglos** //No Recomendado const x = \[1, 2, 3, 4, 5] const name = \['Cande', 'Alex', 'Mariana'] const colors = \['red', 'green', 'blue'] //Recomendado const integers = \[1, 2, 3, 4, 5] const userNames = \['Cande', 'Alex', 'Mariana'] const profileColors = \['red', 'green', 'blue'] **Booleanos** //No Recomendado const active = true const correct = false const write = true const user = false //Recomendado const isActive = true const isCorrect = false const canWrite = true const isUser = false **Números** //No Recomendado let result = 3543 const y = 20 const PI = 3.14159 //Recomendado let totalResult = 3543 const circleRadio = 20 const piNumber = 3.14159 **Funciones** //No Recomendado sendAlertIfIsEmpty() ifNotExistCreateNewObject() password() results() //Recomendado sendAlert() createNewObject() setpassword() getResults() Clases //No Recomendado class School {} class NewService {} class ImplementNewAccount {} //Recomendado class Students {} class Services {} class Account {}
```js const numbersList = [1, 2, 3, 4, 5] const userNames = ['Cande', 'Alex', 'Mariana'] const colorsList = ['red', 'green', 'blue'] const isActive = true const isCorrect = false const canWrite = true const hasUser = false let totalResult = 3543 const maxScore = 20 const PI = 3.14159 sendAlert() ceateObject() setPassword() showResults() class School {} class Service {} class UserAccount {} ```
class School {} class Service {} class Account {}
sendAlert() createObject() setPassword() getResults()
`const isActive = true` `const isCorrect = false` `const hasWrite = true` `const isUser = false`
`const numbers = [1, 2, 3, 4, 5`] `const names = ['Cande', 'Alex', 'Mariana'`] `const colors = ['red', 'green', 'blue']`
En la clase 4 vimos que cuando hay constantes se tienen que utilizar mayusculas. En minusculas se utiliza el camelCase, en mayusculas se utiliza el **UPPER\_SNAKE\_CASE.** ![](https://static.platzi.com/media/user_upload/Screenshot%20from%202024-08-19%2017-13-13-76fa684b-f67a-4b8d-b341-4a2fe364d466.jpg)
Si bien el fin del ejercicio es resolver de acuerdo a las reglas de nomenclatura, también hay que tener en cuenta el contexto del proyecto que llevemos a cabo, para tener un mejor entendimiento de los datos que tenemos que manejar.
```js const numberList = [1, 2, 3, 4, 5] const userNames = ['Cande', 'Alex', 'Mariana'] const colorNames = ['red', 'green', 'blue'] const isActive = true const isCorrect = false const canWrite = true const hasUser = false let totalResult = 3543 const valueY = 20 const valuePI = 3.14159 sendAlert() createNewObject() getPassword() getResults() class School {} class Service {} class Account {} ```
```js // Arrays const numberList = [1, 2, 3, 4, 5] const nameList = ['Andres', 'Edith'] const colorList = ['Red', 'Green', 'Blue'] // Booleanos const isActive = true const isCorrect = false const canWrite = true const hasUser = false // Numbers let totalResult = 3543 let height = 20 const PI = 3.14159 // Functions sendAlert() createObject() setPassword() getResults() // Clases class School {} class Service {} class Account {} ```
```js //================================================== //Arreglos const x = [1, 2, 3, 4, 5] const name = ['Cande', 'Alex', 'Mariana'] const colors = ['red', 'green', 'blue'] //Bien const numbersList = [1, 2, 3, 4, 5] const usersName = ['Cande', 'Alex', 'Mariana'] const colorsList = ['red', 'green', 'blue'] //=================================================== //Booleanos const active = true const correct = false const write = true const user = false //Bien const isActive = true const isCorrect = false const canWrite = true const isUser = false //==================================================== //Números let result = 3543 const y = 20 const PI = 3.14159 //Bien let totalResult = 3543 const totalCoordY = 20 const TOTAL_PI = 3.14159 //Funciones sendAlertIfIsEmpty() ifNotExistCreateNewObject() password() results() //Bien sendAlert() createObject() setPassword() getResult() //Clases class School {} class NewService {} class ImplementNewAccount {} //Bien class Student {} class Service {} class Account {} ```
**Arreglos** --> numbers, usersName, colorsList. **Booleanos** --> isActive, isCorrect, canWrite, hasUser. **Números** --> total, valueY, PI. **Funciones** --> sendAlert, setObject, isPassword, getResults. **Clases** --> School, Service, Account.
**Arrays** `const numberList = [1, 2, 3, 4, 5`] `const userNames = ['Cande', 'Alex', 'Mariana'`] `const colorList = ['red', 'green', 'blue']` **Booleans** `const isActive = true` `const isCorrect = false` `const canWrite = true` `const hasUser = false` **Numbers** `let lastResult = 3543` `const minWidth = 20` `const PI = 3.14159 ` **Functions** `sendAlert()` `createObject()` `setPassword()` `getResults()` **Classes** `class School {}` `class Service {}` `class Account {}`
Asi es como yo nombraria las variables. **Arrays:** numbers userNames colors **Booleanos:** isActive isCorrect canWrite hasUser **Numeros:** totalResult minNumber PI **Funciones:** sendAlert() createNewObject() setPassword() getResults() **Clases:** class School {} class Service {} class Account {}
Estos son mis resultados: **Arreglos** ```js const numbers = [1, 2, 3, 4, 5] const userNames = ['Cande', 'Alex', 'Mariana'] const colorList = ['red', 'green', 'blue'] ```**Booleanos** ```js const isActive = true const isCorrect = false const canWrite = true const isActiveUser = false ```**Números** ```js let salary = 3543 const MAX_ITEMS = 20 const PI = 3.14159 ```**Funciones** ```js sendAlert() createObject() setPassword() getResults() ```**Clases** ```js class School {} class Service {} class Account {} ```
//arrays `const numList = [1, 2, 3, 4, 5`] `const nameList= ['Cande', 'Alex', 'Mariana'`] `const colorList = ['red', 'green', 'blue']` //booleanos `const isActive = true` `const isCorrect = false` `const hasWrite = true` `const isUser = false` //numeros `let totalResult = 3543` `const maxValue = 20` `const minValuePI = 3.14159 ` //funciones sendAler) CreateObject() setPassword() `getResults()` `//clases` `class School `{} `class Service `{} `class Account {}`
```js // Arreglos const numbers = [1, 2, 3, 4, 5]; const userNames = ['Cande', 'Alex', 'Mariana']; const colorList = ['red', 'green', 'blue']; // Booleanos const isActive = true; const isCorrect = false; const canWrite = true; const hasUser = false; // Numeros let totalResult = 3543; const maxValue = 20; const PI = 3.14159; // Funciones sendAlert(); createObject(); setPassword(); getResults(); // Clases class School {} class Service {} class Account {} ```// Arreglos const numbers = \[1, 2, 3, 4, 5]; const userNames = \['Cande', 'Alex', 'Mariana']; const colorList = \['red', 'green', 'blue']; // Booleanos const isActive = true; const isCorrect = false; const canWrite = true; const hasUser = false; // Numeros let totalResult = 3543; const maxValue = 20; const PI = 3.14159; // Funciones sendAlert(); createObject(); setPassword(); getResults(); // Clases class School {} class Service {} class Account {}
```js //Arrays const numbersList = [1,2,3,4,5] const namesList = ['Cande', 'Alex', 'Mariana'] const colorsList = ['red', 'green', 'blue'] //Booleans const isActive = true const isCorrect = false const canWrite = true const hasUser = false //Numbers let finalResult = 3543 const totalUsers = 20 const PI = 3.1426 //Functions sendAlert() createObject() setPassword() getResult() //Class class School{} class Service{} class Account{} ```
`const usersIds = [1, 2, 3, 4, 5`] `const userNames = ['Cande', 'Alex', 'Mariana'`] `const colorScheme = ['red', 'green', 'blue']` `const isActive = true` `const isCorrect = false` `const canWrite = true` `const isUser = false` `let tokens = 3543` `const userAge = 20` `const PI = 3.14159` sendAlert() createPage() changePassword() `getScores()` `class School `{} `class Service `{} `class Account {}`
La constante PI no hallé manera de renombrarla :( **Arreglos** `const x = [1, 2, 3, 4, 5`] `const name = ['Cande', 'Alex', 'Mariana'`] `const colors = ['red', 'green', 'blue']````js const numberList = [1, 2, 3, 4, 5]; const nameList = ['Cande', 'Alex', 'Mariana']; const colorList = ['red', 'green', 'blue']; ```**Booleanos** `const active = true` `const correct = false` `const write = true` `const user = false` ```js const isActive = true; const isCorrect = false; const canWrite = true; const hasUser = false; ```**Números** `let result = 3543` `const y = 20` `const PI = 3.14159 ` ```js const maxResult = 3543; const minResult = 20; const PI = 3.14159 ```**Funciones** `sendAlertIfIsEmpty()` `ifNotExistCreateNewObject()` `password()` `results()` ```js sendAlert() createObject() getPassword() getResult() ```**Clases** `class School `{} `class NewService `{} `class ImplementNewAccount {}` ```js class School {} class Service {} class Account {} ```
Buenas noches... los nombraria asi: Arreglos: numbers, nameList, colorList. Booleanos: isActive, isCorrect, canWrite, hasUser. Numeros: totalSum, valueY, PI. Funciones: sendAlert(), createUser(), setPassword(), calcAverage(). Clases: Student{}, MedicalAppointment{}, CurrentAccount{}.
```js //Arreglos const numberList = [1, 2, 3, 4, 5] const usersName = ['Cande', 'Alex', 'Mariana'] const colorsList = ['red', 'green', 'blue'] //Booleanos const isActive = true const isCorrect = false const canWrite = true const hasUser = false //Números let totalResult = 3543 const maxStudent = 20 const PI = 3.14159 //Funciones sendAlert() createObject() setPassword() getResults() //Clases class School {} class Service {} class Account {} ```
![](https://static.platzi.com/media/user_upload/coment_1-d3324935-9247-4254-83dc-a564009bd624.jpg)
Les dejo mi aportacion ![](https://static.platzi.com/media/user_upload/image-7b8e9f54-8560-494d-85de-e50a98e554c2.jpg)
`// Arrays` `const numberArray = [1,2,3,4,5];` `const nameArrar = ['Cande','Alex','Mariana'];` `const colorsArray = ['green','red','blue'];` `// Boolean` `const isActive = true;` `const hasCorrect = false;` `const canWrite = true;` `const isValidUser = false;` `// Numbers` `let result = 3543;` `const number = 20;` `const PI = 3.14159;` `//Functions` `sendAlert()` `createObject()` `createPassword()` `hasResut()` `// Classes` `class School {}` `class Service {}` `class NewAccount {}`
```js const numbers = [1, 2, 3, 4, 5] const names = ['Cande', 'Alex', 'Mariana'] const colors = ['red', 'green', 'blue'] const isActive = true const isCorrect = false const canWrite = true const isUser = false let totalResult = 3543 const minY = 20 const numberPi = 3.14159 sendAlert() createNewObject() setPassword() getResults() class School {} class Service {} class Account {} ```const numbers = \[1, 2, 3, 4, 5] const names = \['Cande', 'Alex', 'Mariana'] const colors = \['red', 'green', 'blue'] const isActive = true const isCorrect = false const canWrite = true const isUser = false let totalResult = 3543 const minY = 20 const numberPi = 3.14159 sendAlert() createNewObject() setPassword() getResults() class School {} class Service {} class Account {}
Mis respuestas: ![](https://static.platzi.com/media/user_upload/image-e89a9812-5142-4dd3-bff2-df9fe5bdc4cc.jpg)
```js // Arreglos const numberList = [1, 2, 3, 4, 5] const userNames = ['Cande', 'Alex', 'Mariana'] const colors = ['red', 'green', 'blue'] // Booleanos const isActive = true const isCorrect = false const canWrite = true const hasUser = false // Números let totalResult = 3543 const minY = 20 const PI = 3.14159 // Funciones sendAlert() createObject() setPassword() getResults() // Clases class School {} class Service {} class Account {} ```
```js const numbers = [1, 2, 3, 4, 5] const userNames = ['Cande', 'Alex', 'Mariana'] const colors = ['red', 'green', 'blue'] const isActive = true const isCorrect = false const canWrite = true const isUser = false let totalResult = 3543 const maxUsers = 20 const piValue = 3.14159 sendAlert() createNewObject() setPassword() getResults() class School {} class Service {} class Account {} ```
```js //Arreglos const numbersList = [1, 2, 3, 4, 5] const usersNames = ['Cande', 'Alex', 'Mariana'] const colorsList = ['red', 'green', 'blue'] //Booleanos const isActive = true const isCorrect = false const canWrite = true const isUser = false //Números let totalResult = 3543 const pointY = 20 const PI = 3.14159 //Funciones sendAlert() createObject() validatePassword() getResults() //Clases class School {} class Service {} class Account {} ```
```js // Arreglos const numberList = [1, 2, 3, 4, 5] const userNames = ['Cande', 'Alex', 'Mariana'] const colorList = ['red', 'green', 'blue'] // Booleanos const isActive = true const isCorrect = false const canWrite = true const hasUser = false // Números let count = 3543 const maxUsers = 20 const PI = 3.14159 // Funciones sendAlerty() createObject() newPassword() gatResults() // Clases class School {} class Service {} class Account {} ```*// Arreglos*const numberList = \[1, 2, 3, 4, 5]const userNames = \['Cande', 'Alex', 'Mariana']const colorList = \['red', 'green', 'blue'] *// Booleanos*const isActive = trueconst isCorrect = falseconst canWrite = trueconst hasUser = false *// Números*let count = 3543const maxUsers = 20const PI = 3.14159 *// Funciones*sendAlerty()createObject()newPassword()gatResults() *// Clases* class School {}class Service {}class Account {}
Arreglos: `const numberList = [1, 2, 3, 4, 5`] `const nameList = ['Cande', 'Alex', 'Mariana'`] `const colorList = ['red', 'green', 'blue']` Boleanos: `const isActive = true` `const isCcorrect = false` `const canWrite = true` `const hasUser = false` Números: `let totalSale= 3543` `const price= 20` `const PI = 3.14159 ` Funciones: sendAlert() createObject() setPassword() `getResult()` `class School `{} `class Service `{} `class Account {}`
SPOILERS A continuación dejo mis respuestas: Arreglos `const numbers = [1, 2, 3, 4, 5`] `const userNames = ['Cande', 'Alex', 'Mariana'`] `const colors = ['red', 'green', 'blue']` Booleanos `const isActive = true` `const isCorrect = false` `const canWrite = true` `const hasUser = false` Números `let totalResult = 3543` `const minResult = 20` `const PI = 3.14159` Funciones `sendAlert()` `createNewObject()` `setPassword()` `getResults()` Clases `class School {}` `class Service {}` `class Account {}`
Arreglos: `const numberList = [1,2,3,4,5];` `const nameList = ['Cande', 'Alex', 'Mariana']` `const colorList = ['red', 'green', 'blue']` Booleanos: `const isActive = true` `const isCorrect = false` `const canWrite = true` `const hasUser = false` Numeros: `let finalResult = 3543` `const maxNumber = 20` `const PI = 3.14159` Funciones: `sendAlert()` `CreateNewObject()` `setPassword()` `showResult()` Clases: `class School {}` `class Service {}` `Class Account {}`
![](https://static.platzi.com/media/user_upload/image-125ff82c-acf9-4964-ae7b-c8398850ec46.jpg)
```js //Mal const x = [1, 2, 3, 4, 5] const name = ['Cande', 'Alex', 'Mariana'] const colors = ['red', 'green', 'blue'] // Mios const listNumbers = [1, 2, 3, 4, 5] const listNames = ['Cande', 'Alex', 'Mariana'] const listColors = ['red', 'green', 'blue'] // Mal const active = true const correct = false const write = true const user = false // Mios const isActive = true const isCorrect = false const canWrite = true const hasUser = false // Mal let result = 3543 const y = 20 const PI = 3.14159 // Mios let totalResult = 3543 const maxUsers = 20 const PI = 3.14159 // Mal sendAlertIfIsEmpty() ifNotExistCreateNewObject() password() results() // Mias sendAlert() createObject() setPassword() getResults() // Mal class School {} class NewService {} class ImplementNewAccount {} // Mias class School {} class Service {} class Account {} ```
`// arrays` `const NUMBERS = [1, 2, 3, 4, 5]` `const NAMELIST = ['Cande', 'Alex', 'Mariana']` `const COLORLIST = ['red', 'green', 'blue']` `// booleans` `const ISACTIVE= true` `const ISCORRECT = false` `const CANWRITE= true` `const ISUSER = false` `// numbers` `let total = 3543` `const Y = 20` `const PI = 3.14159 ` `// functions` `sendAlert()` `createObject()` `getPassword()` `getResults()` `// classes` `class School `{} `class Service `{} `class Account {}`
```js //Arrays: const numbersList = [1, 2, 3, 4, 5]; const namesList = ['Cande', 'Alex', 'Mariana']; const colorsList = ['red', 'green', 'blue']; //Booleanos: const isActive = true; const isCorrect = false; const canWrite = true; const hasUser = false; //Números: let totalResult = 3543; const minNumber = 20 const PI = 3.14159 //Funciones: sendAlert() createObject() setPassword() getResults() //Clases: class School {} class Service {} class Account {} ```Adaptado

Arreglos:
const arraysNumber = [1, 2, 3, 4, 5]
const ArraysUsersName = [‘Cande’, ‘Alex’, ‘Mariana’]
const arraysColors = const colors = [‘red’, ‘green’, ‘blue’]

Booleano:
const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

Numeros:
let totalResult= 3543
const maxY= 20
const PI = 3.14159

Funciones:
sendAlert()
CreateObject()
setPassword()
getResults()

Clases:
class School {}
class Service {}
class Account {}

Arreglos `const numbersList = [1, 2, 3, 4, 5]` `const namesList = ['Cande', 'Alex', 'Mariana'`] `const colorsList = ['red', 'green', 'blue']` ## Booleanos `const isActive = true` `const isCorrect = false` `const isWrite = true` `const isUser = false` ## Números `let result = 3543` `const number = 20` `const PI = 3.14159` ## Funciones sendAlert() createNewObject() getPassword() showResult() Clases `class School `{} `class Service `{} `class Account {}`
```js /* --- Arreglos --- */ const numberList = [1, 2, 3, 4, 5] const nameList = ['Cande', 'Alex', 'Mariana'] const colorsList = ['red', 'green', 'blue'] /* --- Booleanos --- */ const isActive = true const isValid = false const canWrite = true const hasUser = false /* --- Números --- */ let total = 3543 const yCoordinate = 20 const PINumber = 3.14159 /* --- Funciones --- */ sendAlert() createUser() isValidPassword() getUser() /* --- Clases --- */ class School {} class Service {} class Account {} ````const x = [1, 2, 3, 4, 5`] `const name = ['Cande', 'Alex', 'Mariana'`] `const colors = ['red', 'green', 'blue']`
ARRAYS => const listNumbers = \[1, 2, 3,]; `const userName = ['Cande', 'Alex', 'Mariana'];` `const listColors = ['red', 'green', 'blue'`]; BOOLEANOS => `const isactive = true` `const isCorrect = false` `const canWrite = true` `const hasUser = false` NUMEROS => `let totalResult = 3543` `const minNumber = 20` `const maxNumberPi = 3.14159 ` FUNCIONES => sendAlert() CreateObject() setPassword() `getResults()` `CLASES =>` `class School `{} `class Service `{} `class Account {}`

Arreglos
-numbers
-userNames
-colorsList

Booleanos
-isActive
-isCorrect
-canWrite
-hasUser

Numeros
-total
-variableY
-PI

Funciones
-sendAlert
-createNewObject
-isAuthPaswordd
-calculateResults

Clases
-School
-Service
-Account

Arreglos
const numbersList  = [1, 2, 3, 4, 5]
const userNames  = ['Cande', 'Alex', 'Mariana']
const colorsList = ['red', 'green', 'blue']

Booleanos
const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

Numeros
let total = 3543
const minNumber = 20
const totalPi = 3.14159 

Funciones
sendAlert()
CreateObject()
setPassword()
getResults()

Clases
class school {}
class service {}
class account {}


Dejo mis respuestas:
*
*
*
*
*
*
*
*
*
*
*

// Arreglos

const numberList = [1, 2, 3, 4, 5]
const userNames = ['Cande', 'Alex', 'Mariana']
const colorList = ['red', 'green', 'blue']

// Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const isUser = false

// Números

let totalResults = 3543
const minUsers = 20
const PI = 3.14159 //Es muy expli'cito

// Funciones

getAlert()
isObject()
setPassword()
getResults()

// Clases

class School {}
class Service {}
class Account {}

numberList
userNames
colorNames

isActive
canCorrect
canWrite
hasUser

totalResult | amoun | tatalSuma
minRange | maxRange
PI

sendAlertRed
createNewUser
getPassword
getResultAccount

nameSchool
Services
newAccount

Arreglos

const numbersList = [1, 2, 3, 4, 5]
const namesList = ['Cande', 'Alex', 'Mariana']
const colorsList = ['red', 'green', 'blue']

Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const isUser = false

Números

let totalUsers = 3543
const minUsers = 20
const PI = 3.14159 

Funciones

sendAlert()
createObject()
getPassword()
getResults()

Clases

class School {}
class Service {}
class Account {}
const numbersList = [1, 2, 3, 4, 5]
const userNames = ['Cande', 'Alex', 'Mariana']
const colorsList = ['red', 'green', 'blue']

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

let totalResult = 3543
const maxUser = 20
const PI = 3.14159 


sendAlert()
createObject()
getPassword()
showResult()

class School {}
class Service {}
class Account {}

const numbers = [1, 2, 3, 4, 5]
const userNames = ['Cande', 'Alex', 'Mariana']
const colorNames = ['red', 'green', 'blue']

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

let volume = 3543
const minRadius  = 20
const PI = 3.14159

sendAlert()
createNewObject()
setPassword()
getResults()

class School {}
class Service {}
class Account {}

Arreglos

const numberList = [1 ,2 ,3 ,4, 5]
const nameList = [‘Cande’, ‘Alex’, ‘Mariana’]
const colorsList = [‘red’, ‘green’, ‘blue’]

Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

Números

let totalResult = 3543
const maxUsers = 20
const PI = 3.14159

Funciones

sendAlert()
createObject()
setPassword()
getResults()

Hola! Dejo como se deberían de nombrar las Variables según el tipo de dato

Arreglos
const numbersList = [1, 2, 3, 4, 5]
const userNames = [‘Cande’, ‘Alex’, ‘Mariana’]
const colorNames = [‘red’, ‘green’, ‘blue’]

Booleanos
const isActive = true
const isCorrect = false
const canWrite = true
const isUser = false

Números
let totalResult = 3543
const minY = 20
const PI = 3.14159

Funciones
sendMessage()
createOjb()
setPassword()
getResults()

Clases
class School {}
class service {}
class account {}

Mi aporte:

//ARREGLOS
const numbers = [1, 2, 3, 4, 5]
const userNames = ['Cande', 'Alex', 'Mariana']
const colors = ['red', 'green', 'blue']

//BOOLEANOS
const isActive = true
const isCorrect = false
const canWrite = true
const isUser = false

//NÚMEROS
let totalUsers = 3543
const maxUsers = 20
const PI = 3.14159 

//FUNCIONES
sendAlert()
createNewObject()
setPassword()
getResults()

//CLASES
class School {}
class Service {}
class Account {}

Asi lo escribiria yo teniendo un par de cosas en cuenta. Una que no se ingles y la otra es que hay opciones donde invente el contexto. Por ejemplo los nombres no aclara de que (elegi empleado pero pude dejar solo nombres como names), en booleanos el usuario puede ser if por si se valida si es un usuario o no para darlo de alta como en cualquier pagina o has si recibe un objeto y consulta si contiene al usuario, en numeros y funciones el result y results puede ser cualquier cosa y lo invente y lo mismo con el generico de clases (NewService)

Arreglos :

const numbers = [1, 2, 3, 4, 5]
const employeeNames = ['Cande', 'Alex', 'Mariana']
const colors = ['red', 'green', 'blue']

Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

Números

let sumInvoice = 3543
const maxUsers = 20
const PI = 3.14159 

Funciones

sendAlert()
CreateObject()
updatePassword()
getTotalInvoice()

Clases

class School {}
class Authorization {}
class Account {}

Arreglos

const numList = [1, 2, 3, 4, 5]
const nameList = ['Cande', 'Alex', 'Mariana']
const colorList = ['red', 'green', 'blue']

Booleanos

const isActive = true
const isCorrect = false
const isWrited = true
const isUser = false

Números

let result = 3543
const Y = 20
const PI = 3.14159 

Funciones

alert()
createObject()
pwd()
result()

Clases

class School {}
class Service {}
class Account {}

const numbers = [1, 2, 3, 4, 5]
const names = [‘Cande’, ‘Alex’, ‘Mariana’]
const colors = [‘red’, ‘green’, ‘blue’]

const isActive = true
const IsCorrect = false
const canWrite = true
const hasUser = false

let totalResult = 3543
const maxY = 20
const PI = 3.14159

sendAlert()
createObject()
setPassword()
getResults()

class School {}
class Service {}
class Account {}

// Arrays
const numbersList = [1, 2, 3, 4, 5]
const namesList = ['Cande', 'Alex', 'Mariana']
const colorsList = ['red', 'green', 'blue']
// Booleans
const isActive = true
const isCorrect = false
const canWrite = true
const isUser = false
//Numbers
let totalResult = 3543
const maxY = 20
const PI = 3.14159 // This confuses me
// Functions
sendAlert()
existObject()
getPassword()
setResults()
// Class
class SchoolProfile {}
class Service {} // I don't sure
class Account {}

Mi aporte

const numbers = [1, 2, 3, 4, 5]
const  UserNames = ['Cande', 'Alex', 'Mariana']
const ColorList = ['red', 'green', 'blue']

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

let MaxResult = 3543
const ejeY = 20
const PI = 3.14159 

sendAlert()
createObject()
getPassword()
getResults()

class School {}
class Service {}
class Account {}

Arreglos

const numbers = [1, 2, 3]
const usersName = ['Cande', 'Alex']
const colorList = ['red', 'blue']

Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

Números

let maxResult = 3543
const coordinateY = 20
const PI  = 3.14159 

Funciones

sendAlert()
createObject()
setPassword()
getResult()

Clases

class ProfileSchool {}
class Service {}
class Account {}

Arrays

const numbers = [1, 2, 3, 4, 5]
const names = ['Cande', 'Alex', 'Mariana']
const colors = ['red', 'green', 'blue']

Booleans

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

Numbers

let totalResult = 3543
const maxSize = 20
const PI = 3.14159 

Functions

sendAlert()
createNewObject()
hashPassword()
showResults()

Classes

class Alumn {}
class Service {}
class User {}

// Arreglos
numbersList = [1, 2, 3, 4, 5];
namesList = [‘Cande’, ‘Alex’, ‘Mariana’];
colorsLisst = [‘red’, ‘green’, ‘blue’];

// Booleanos
const isActive = true;
const isCorrect = false;
const canWrite = true;
const hasUser = false;

// Números
const total = 3543
const axisY = 20
const pi = 3.14159

// Funciones
sendAlert()
createObject()
setPassword()
getResults()

// Clases
class School {}
class Service {}
class Account {}

Arreglos

const numbers = [1, 2, 3, 4, 5]
const userNames = ['Cande', 'Alex', 'Mariana']
const colors = ['red', 'green', 'blue']

Booleanos

 const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

Números

let result = 3543 //No hay contexto XD
const axisY = 20
const PI = 3.14159 

Funciones

sendAlert()
createObject()
setPassword()
getResults()

Clases

class School {}
class Service {}
class Account {}

Espero algun Feedback.

++
+
+
+
++

++
+
+

const numbersList = [1, 2, 3, 4, 5]
const usersNames = ['Cande', 'Alex', 'Mariana']
const colorsList = ['red', 'green', 'blue']

const isActive = true
const isCorrect = false
const canWrite = true
const isUser = false

let totalResult = 3543
const y = 20
const PI = 3.14159 

sendAlert()
createObject()
getPassword()
showResult()

class School {}
class NewService {}
class NewAccount {}

Mi solucion al ejercicio
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Arreglos

const numberList= [1, 2, 3, 4, 5]
const nameList = ['Cande', 'Alex', 'Mariana']
const colorList= ['red', 'green', 'blue']

Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

Numeros

let total = 3543
const num2 = 20
const PI = 3.14159

Funciones

sendAlert()
createNewObject()
setPassword()
getTotal()

Clases

class School {}
class Service {}
class Account {}

Arreglos

  • const numberList
  • const userNames
  • const colorList

Booleanos

  • const isActive = true
  • cosnt isCorrect = false
  • const canWrite = true
  • const isUser = false

Números

  • let totalResult = 3543
  • const numberForY =20
  • const PI = 3.14159

Funciones

  • sendAlert()
  • createObject()
  • setPassword()
  • getResults()

Clases

  • class userProfile{ }
  • class newService{ }
  • class newAccount { }

arreglos//
const numbers = [1, 2, 3, 4, 5]
const names = [[‘Cande’, ‘Alex’, ‘Mariana’]
const colors = [‘red’, ‘green’, ‘blue’]

booleanos//
const isActive = true
const isCorrect = false
const aWrite = true
const isUser = false

numeros//
const totalUsers = 3543
const coordinateY = 20
const PI = 3.14159

funciones//
sendAlert()
createObject()
savePassword()
getResults()

clases//
profileSchool {}
newService {}
newAccount {}

  • Arrays
    const numbers = [1, 2, 3, 4, 5]
    const userNames = [‘Cande’, ‘Alex’, ‘Mariana’]
    const colors = [‘red’, ‘green’, ‘blue’]

  • Booleanos
    const isActive = true
    const isCorrect = false
    const canWrite = true
    const isUser = false

  • Números

let totalResult = 3543
const y = 20
const PI = 3.14159

  • Funciones

sendAlertIfIsEmpty()
createNewUsertIfNotExist()
updatePassword()
getResults()

  • Clases

class School {}
class Service {}
class Account {}

Arreglos:
const listNumber = [1, 2, 3, 4, 5]
const userNames = [‘Cande’, ‘Alex’, ‘Mariana’]
const listColors = [‘red’, ‘green’, ‘blue’]

Booleanos
const isActive = true
const isCorrect = false
const cantWrite = true
const hasUser = false

Numeros
let totalUsers = 3543
const ejeY = 20
const PI = 3.14159

Funciones
sendAlert()
CreateNewObject()
getPassword()
setResults()

Clases
class School {}
class Service {}
class Account {}

Arrays
const numbers = [1, 2, 3, 4 ,5];
const userNames = [‘Cande’, ‘Alex’, ‘Mariana’];
const colorNames = [‘red’, ‘green’, ‘blue’]

Booleanos
const isActive =true
const notCorrect = false
const canWrite = true
const isUser = false

Numerico
let MaxResult= 3543
const EjeY = 20
const PI = 3.14159

Funciones
createAlert();
updateObject();
setPasswork();
getResult();

Clases
class School {};
class NewService {};
class userAccount{};

Solo veras un poco, a menos que muestres el comentario

Arreglos
numbers
usernames
ColorNames

Boleanos:
isActive
isCorrect
canWrite
hasUser
Numeros:
totalResutl
coordinateY
PI
Funciones:
sendAlert
createObject
setPassword
getResults
School
Service
Acoount

Mi solución:

Arreglos:

const numbersList = [1, 2, 3, 4, 5]
const userNames = ['Cande', 'Alex', 'Mariana']
const colorNames = ['red', 'green', 'blue']

Booleanos:

const isActive = true
const isCorrect = false
const canWrite = true
const isUser = false

Números:

let total = 3543
const yCoordinate = 20
const PI = 3.14159 

Funciones:

sendAlert()
createNewObject()
setPassword()
getResults()

Clases

class School {}
class Service {}
class Account {}

CLASES
class School {}
class Service {}
class Account {}

FUNCIONES
alertForEmpty()
createNewObject()
getPassword()
setResults()

NÚMEROS
let changeResult = 3543
const numberForY = 20
const PI = 3.14159

BOOLEANOS
const isActive = true
const isCorrect = false
const canWrite = true
const haveUser = false

ARRAYS
const numbers = [1, 2, 3, 4, 5];

const userNames = [‘Cande’, ‘Alex’, ‘Mariana’];

const nameColors = [‘red’, ‘green’, ‘blue’];

Aquí dejo mis respuestas

const productAmounts = [1, 2, 3, 4, 5]
const cashierNames = ['Cande', 'Alex', 'Mariana']
const productColors = ['red', 'green', 'blue']

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

let totalAmount = 3543
const dollarPrice = 20
const PI = 3.14159 

sendAlert()
createNewObject()
setPassword()
getResults()

class SchoolInformation {}
class SetNewService {}
class CreateNewAccount {}

Arreglos

const integerNumbers = [1, 2, 3, 4, 5]
const peopleNames = ['Cande', 'Alex', 'Matrina']
const primaryColors = ['red', 'green', 'blue']

Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false

Números

let totalImport = 3543
const minAge = 20
const PI = 3.14159

Funciones

sendAlert()
createObjetcs()
getPassword()
setResults()

Clases

class School {}
class Service {}
class Account {}

Arreglos

const numbersList = [1, 2, 3, 4, 5]
const userNames = ['Cande', 'Alex', 'Mariana']
const colorNames = ['red', 'green', 'blue']

Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const isValidUser = false

Números

let totalResult = 3543
const maxNumber = 20
const PI = 3.14159 

Funciones

sendAlert()
createObject()
setPassword()
getResults()

Clases

class School {}
class Service {}
class Account {}

Arreglos

const numbers = [1, 2, 3, 4, 5]
const userNames = ['Cande', 'Alex', 'Mariana']
const colors = ['red', 'green', 'blue']

Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const isUser = false

Números

let sumResult = 3543
const coordinateY = 20
const PI = 3.14159 

Funciones

sendAlert()
createObject()
setPassword()
getResults()

Clases

class School {}
class Service {}
class Account {}

Arreglos
const numbersList = [1, 2, 3, 4, 5]
const namesList = [‘Cande’, ‘Alex’, ‘Mariana’]
const colorsList = [‘red’, ‘green’, ‘blue’]

Booleanos:
const isActive = true
const isCorrect = false
const canWrite = true
const isUser = false

Números
let maxUsers = 3543
const totalUsers = 20
const PI = 3.14159


Funciones
sendAlert()
createNewObject()
sendPassword()
getResult()


Clases

class School {}
class NewService {}
class ImplementNewAccount {}

  1. ARREGLOS
    numbers
    userNames
    colors
  2. BOOLEANOS
    isActive
    isCorrect
    canWrite
    hasUser
  3. NUMEROS
    total
    age
    PI
  4. FUNCIONES
    sendAlert()
    createObject()
    setPassword()
    getResult()
  5. CLASES
    School{}
    Service{}
    Account{}

Arreglos

const numbers = [1,2,3,4,5]
const userNames = [‘Cande’,‘Alex’,‘Mariana’]
const colors = [‘red’,‘green’,‘blue’]

Booleanos
const isActive= true
const isCorrect = false
const isWrite = true
cons isUser = false

Números
let total = 3543
const maxItems = 20
const PI = 3.14159

Funciones
sendAlert()
createObject()
setPassword()
getResults()

Clases
class School {}
class Service{}
class Account{}

Arreglos

const numbers = [1, 2, 3, 4, 5]
const userNames = ['Cande', 'Alex', 'Mariana']
const colorsList = ['red', 'green', 'blue']

Booleanos

const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false 

Números

let maxResult = 3543
const HOURS = 20
const PI = 3.14159 

Funciones

sendAlert()
newObject()
setPassword()
getResults()

Clases

Aun no domino las clases asi que hasta las funciones mis chavos xD

const listNumbers = [1, 2, 3, 4, 5]
const listNames = [‘Cande’, ‘Alex’, ‘Mariana’]
const listColors = [‘red’, ‘green’, ‘blue’]

const isActive = true
const isCorrect = false
const canWrite = true
const user = false

totalResult = 3543
const MIN_NUMBER = 20
const PI_VALUE = 3.14159

sendAlert()
createNewObject()
getPassword()
getResults()

class School {}
class Service {}
class Account {}

Para nombrar adecuadamente las variables, seguí ciertas convenciones. A los arrays les coloqué un prefijo “list” y un nombre descriptivo para entender que son estructuras de datos de tipo lista o array.

const listNumbers = [1, 2, 3, 4, 5];
const listNames = ['Cande', 'Alex', 'Mariana'];
const listColors = ['red', 'green', 'blue'];

Para los booleanos, usé “is”, “can” o “has” y su respectivo adjetivo o nombre descriptivo. Esto se hizo con el fin de ser claros con los nombres y que se entienda si pueden o no hacer algo, su estado, etc.

const isActive = true;
const isCorrect = false;
const canWrite = true;
const hasUser = false;

Para los números, agregué el prefijo “total” y las constantes las puse en mayúsculas, como “MAX_NUMBER” y “PI”. Las constantes deberían estar en mayúsculas, por lo que no usé camel case para ese caso en particular.

let totalResult = 3543;
const MAX_NUMBER = 20; 
const PI = 3.14159;

Para las funciones, usé un verbo y su adjetivo para nombrarlas, dejando solo lo esencial y descriptivo.

function sendAlert() {}

function createNewObject() {}

function setPassword() {}

function getResults() {} 

Finalmente, para las clases, utilicé nombres cortos y concisos que describen al objeto de la clase.

class School {}

class Service {}

class Account {}
const numbers = [1, 2, 3, 4, 5]
const names = ['Cande', 'Alex', 'Mariana']
const colors = ['red', 'green', 'blue'] // rgbColors :P
---
const isActive = true
const isCorrect = false
const canWrite = true
const hasUser = false
---
let followers = 3543
const  maxFollowers= 20
const PI = 3.14159 
---
sendAlert()
createUser()
updatePassword()
getResults()
---
class School {}
class ProductService {}
class Account {}

const x = [1, 2, 3, 4, 5] => listNumbers
const name = [‘Cande’, ‘Alex’, ‘Mariana’] => listNames
const colors = [‘red’, ‘green’, ‘blue’] => listColors

const active = true => isActive
const correct = false => isCorrect
const write = true => canWrite
const user = false => isUser/hasUser

let result = 3543 => totalUser
const y = 20 => minUser
const PI = 3.14159 => yo no lo cambiaria, ya que las constantes matematicas se pueden definir por su nombre conocido y al estar definidos en mayusculas se sobreentiende por convencion que es una constante. Desde mi punto de vista

sendAlertIfIsEmpty() => sendAlert()
ifNotExistCreateNewObject() => CreateObject()
password() => setPassword()/getPassword()
results() => getResults()

class School {} => Bien nombrada
class NewService {} => Service{}
class ImplementNewAccount {} => Account{}

Esta es mi respuesta // Arraysconst numbersList = \[1, 2, 3, 4, 5]const namesList = \['Cande', 'Alex', 'Mariana']const colorsList = \['red', 'green', 'blue'] // Booleanosconst isActive = trueconst isCorrect = falseconst canWrite = trueconst hasUser = false; // Númberslet result = 3543const initialNumber = 20 // Suponiendo que sea el valor inicialconst PI = 3.14159 // Creo que este esta bien // FunctionssendAlert()createObject()getPassword()getResults() // Classclass School {}class Service {}class Account {}