![](/img/trans.png)
[英]Expected an assignment or function call and instead saw an expression error in function
[英]Expected an assignment or function call and instead saw an expression(error)
let a=50, b=150;
let elements= [ { data: { id: 'root ', label: 'SANIANJUM' }, position: { x: a, y: b } }, ]; let username = "SANIANJUM";
elements.push({ data: { id: 'two', label: 'Node 2' }, position: { x: 150, y: 100 } },)
elements.push({ data: { source: 'one', target: 'two', label: 'Edge from Node1 to Node2' } },);
//無法推送到我的元素數組:[在此處使用異步獲取數據][2] [2]:https.//i.stack.imgur.com/R3R7O.png
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.