I'm having trouble grouping some data using JavaScript .
I have the following array of objects that return from the database and send it to view :
var object = [
{ data: 1, categories: "Branca", name: "Feminino" },
{ data: 1, ca...
Whenever I open the Chrome Console, I keep an eye on the autocomplete of properties, to see if there is anything new, something I have not yet learned. And it struck me to see that objects have the property called __defineSetter__ and...
How can I store values and variables of all types within a vector? Ex:
vetor1.Add("valor em string");
vetor1.Add(100);
vetor1.Add(100.10);
vetor1.Add(-100);
I have no idea how I can do this.
pessoa = {
nome: 'leandro',
idade: '2'
}
for(x=0;x<pessoa.idade;x++){
console.log('Ola mundo'); // ele repete 2 vezes "Ola mundo" na tela
}
The question I have is that I thought that javascript differed in string numbers, but...
I'm getting an API in my application that returns an Array of names, I've created a class to assign each name to 1 instance but I'm having trouble getting this JSONArray and turning it into object, all the methods I've tried do not Did they work...
I have this code and I wanted to know how best to get the user to push a button and, from there, store the data requested by the page in the JS object and, after that, display the message written in the code . Could someone help? Thank you.
J...
To try to make an attribute of one of the objects in an array of objects switch between true and false follow code:
Initial status:
constructor(props) {
super(props)
this.state = {
post: [{
nome: '',...
I have a question maybe a little stupid, but come on, in Javascript, I can create an instance of an object stating thus, let's go in an example of a game, where I have to install bullets to shoot at the enemy:
var Bala = {
myFunctionInit:...
I'm studying a little more javascript here and I came to a problem:
I have an object called player:
let Player = function () {
this.name = 'player';
}
Player.prototype = new Sprite();
Player.prototype = new Shape2D();
That's what I...