callback tag

7 questions


1 answers
112 views
0
[javascript] Questions about callback

Hello, the code below is written as an example for callback.var cbExample = function(number, cb) { setTimeout(function() { var sum = 0; for (var i = number; i > 0; i--) { sum += i; } cb(sum); }, 0)...

2 years ago

1 answers
111 views
0
[javascript] When executing a callback function with a factor in a temporary variable

Hi, everyone. When you call addEventListener with a callback function in a temporary variable, something suddenly popped up. Originally, when a scroll event occurs, I wrote the code first to check whe...

2 years ago

1 answers
123 views
0
I would like to ask you about the Context and Call Back that Android uses on Android.

When you use a method like getApplicationContext() on Android, what does that mean?While studying the Android life cycle, methods such as onCreate() and onStart() are usually called callback methods, ...


2 answers
128 views
0
How do I call a function after receiving a value from two callback functions?

// ...var foo, barfoobar.first(function (value) { foo = value})foobar.second(function (value) { bar = value})function next() { // ...} // ...It's a code in this format I want to call the next() functi...

2 years ago

1 answers
119 views
0
Node.js callback function question.

var i = 0;function a(callback){ i +=1; callback(i);};setInterval(a((num)=>{ console.log(num);}),1000);The above is the code I made. I expected that it would come out as 1, 2, 3... every second, but...

2 years ago

2 answers
85 views
0
[javascript] Ask the callback function of the sort function

The sort function receives the callback function as a parameter. And depending on what the callback function returns, the sort method is different. I'm asking you a question because I don't understand...


1 answers
118 views
0
Unity Event Trigger > Event Additional Questions.

public void CreateObject() { int randomType = UnityEngine.Random.Range(0, 2); GameObject temp = (GameObject)Instantiate(Resources.Load(Prefabs/Object)); int randomItem; temp.AddComponent<ItemSc...

2 years ago

© 2024 OneMinuteCode. All rights reserved.