If I want to send a function object with one child called foo equals "bar", I need to do the following:
var obj:Object = new Object(); obj.foo="bar"; myfunction(obj);
Is there a way to declare an object in a function itself? something like that:
myfunction(new Object{foo:"bar"});
Thank you!
using flash-as3.
You almost had it in your example!
To create an inline object, you use curly braces:
myfunction({foo:"bar"});
You can also do inline arrays with parentheses:
myfunction(["bar", "baz"]);
Source: https://habr.com/ru/post/1732780/More articles:Изменение фона текста в элементе управления редактированием - c++binding to member variables - c ++Using a directory traversal attack to execute commands - securityConvert from ascii to utf-8 with python - pythonURLDownloadToFile API, how can it be used asynchronously? - c ++Azure tables and SQL Server management studio - sql-serverCan I associate my ASP.NET application with a stand-alone executable web application? (I know that Java can) - javaORACLE: Are grants deleted when an object is deleted? - oracleHow to indicate whether a T4 file should produce any output - splitСуществует ли команда .NET XPath "diff" для двух XmlDocuments? - c#All Articles