Commit 12ef66e3 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 8cf77e90
......@@ -50,6 +50,7 @@ let arrNew=[]
console.log(arr)
console.log('Balance ->',balance)
console.log('Worth ->',arrNew[0])
console.log('Detail ->',get(arrNew[0].date))
}
......@@ -72,3 +73,13 @@ function add(date, profit,side) {
arr.push({date: date, profit: profit,count:1,longCount:1,shortCount:1})
}
function get(date) {
for (let i = 0; i < arr.length; i++)
if (arr[i].date === date) {
return arr[i]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment