Answer the question
In order to leave comments, you need to log in
How to overwrite data in an array?
All good. There is an array.
var trainingData = [
{ input: [0], output: [0] },
{ input: [1], output: [1] },
{ input: [2], output: [2] },
{ input: [3], output: [3] },
{ input: [4], output: [4] },
{ input: [5], output: [5] },
{ input: [6], output: [6] },
];
var trainingData = [
{ input: [1], output: [1] },
{ input: [2], output: [2] },
{ input: [3], output: [3] },
{ input: [4], output: [4] },
{ input: [5], output: [5] },
{ input: [6], output: [6] },
{ input: [новые данные], output: [новые данные] },
];
trainingData[0].input.shift(); -
trainingData[0].output.shift();
trainingData[trainingData.length-1].input.push(новые даные);
trainingData[trainingData.length-1].output.push(новые даные);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question