Telash
Telash14mo ago

telash – 16-55 Sep 3

Is there a way to pass paramaters and use them, not by order?
3 Replies
Telash
Telash14mo ago
like func test(num1,num2) log(num1) log(num2) test(2===---===num2,1===---===num1) output:1 output:2
ScriptyChris
ScriptyChris14mo ago
You can pass an object literal Then order doesn't matter and it's also more convenient for more arguments passed For example:
function fn(params) {}

fn({
param1: 'test',
param2: 'something',
})
function fn(params) {}

fn({
param1: 'test',
param2: 'something',
})
reactibot
reactibot14mo ago
This thread hasn’t had any activity in 36 hours, so it’s now locked. Threads are closed automatically after 36 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1147937936860520529