In the following example I have a class and add two functions by prototype the first as defined by funcion normalmente , while the second with arrow function
simpleClase = function(){
this.ejemplo = 1
}
simpleClas...
I have a base class ( Persona , which implements some methods and in its constructor accepts parameters.
is the following
class Persona
{
constructor (nombre, apellido)
{
this.nombre = nombre;
this.apellido = apel...
Trying to show data in a view in React Js , I have found an error that following the steps of the tutorial still persists:
this.state.users.map is not a function
The code is as follows
import React, {Component} from 'react';
im...
I was wondering if all the iterables predefined in JavaScript that have the property .length , can access their elements via operator [<indice numérico>] and vice versa?
Array -> '.length' & operador '[]'
String ->...
I'm having a lot of trouble getting the value of a promise . Basically I want the value that returns a promise to be assigned to a variable. For example
This example uses the following elements: vue. js , vuex , almacen is a syno...
Hi, I'm trying to use the for in function to find the name of an array-like property that I have inside an object and if there is an item stored inside the property. But the problem is that it is saving the item in all the arrays and what I want...
I am trying to implement the OOP to manipulate the DOM but there are certain things that I do not know where to place, for example the addEventListeners, a specific case that I am facing is, I have created an object that works with some elements...
How to call a method (from another) that are in the same class in NodeJS?
class Usuario{
static foo(){
let a = this.bar();
}
bar(){
return true;
}
}
Usuario.foo();
I...
Well I am doing a React-Readux application, and I have the following Array of objects that my store has:
const authors = [
{
id: 'cory-house',
firstName: 'Cory',
lastName: 'House',
address: {
city: 'Caracas'
}
},...