content元素用javascript初始化
content.children[0].style.transform = "translateX(" + (-200) + "px) scaleX(" + 1.6 + ") scaleY(" + 1.2 + ")";
Run Code Online (Sandbox Code Playgroud)
如何获得translateX的价值?
我需要在 Ballerina 中set使用array字符串创建字符串。除了在插入之前使用reduce()或检查之外indexOf(),我找不到创建set使用 Ballerina 编程语言的方法。
string[] arr = ["a", "b", "c", "a", "d", "c"];
string[] set = arr.reduce(function(string[] accum, string item) returns string[] {
if accum.indexOf(item) == () {
accum.push(item);
}
return accum;
}, []);
Run Code Online (Sandbox Code Playgroud)
有没有更好的方法在 Ballerina 中创建场景?