How to replace the await keyword in an async function to another?

Good day! Anyway, I have an asynchronous function which contains several await. If I use it in another place and I need to replace in one of the await-s some values, how can I do that?
async fn() {
 await the first action {count: false};
 await a second action {num: false};
 await third action {"sum": false};
}

now I need to use the function fn and substitute in the value to true. How it can be implemented?
April 3rd 20 at 18:49
1 answer
April 3rd 20 at 18:51
Solution
async fn(raz,dva,tri) {
 await the first action {count: raz};
 await a second action {num: dva};
 await third action {sum: tri};
}
but if there are no parameters? say something like:
fn await().then(() => await first action {count: true;

it is certainly wrong, but something like - amely_Kassulke commented on April 3rd 20 at 18:54
@amely_Kassulke, well, if you did not think to reuse the function, what for it is necessary?
copy each time changes.
What could be easier?
async fn(raz=false,e=false,tri=false) {
 await the first action {count: raz};
 await a second action {num: dva};
 await third action {sum: tri};
}
- Albina.Krajcik commented on April 3rd 20 at 18:57
@Albina.Krajcik, Yes I agree! - amely_Kassulke commented on April 3rd 20 at 19:00

Find more questions by tags JavaScript