Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
46 views

snippet 1 -> output is "b" if (true) { x = "b"; function x() {} } console.log(x); //b snippet 2 -> output is ƒ x() {} if (true) { function x() {} x = "b";...
0 votes
0 answers
45 views

How come the const styles can be declared and initialized after being used in the code (in the App function) since in javascript they cannot be accessed before their declaration, resulting in a ...
-1 votes
2 answers
72 views

I have the following code working but and it currently looks like this: import { OtherClass } from "other-class" class VeryLongClass { } OtherClass.run(VeryLongClass); But I want it to ...
1 vote
0 answers
142 views

I have a doubt regarding, how hooks like useCallback() work when the variables, arrow functions, and states used in it and its dependency, are declared before and after the useCallback(). Note: The ...
0 votes
3 answers
726 views

I need a composable that needs to call a function from the viewmodel, and that function returns an instance of Airport object. I did this: @Composable fun FlightsScreen(getAirportDetails: (String)->...
0 votes
1 answer
163 views

I have a BaseRepository abstract class in my code which contains client instance and some general functions. The AuthRepository class inherits from BaseRepository. And I have an AuthService module ...
0 votes
2 answers
64 views

I am working with tree-like structure in Javascript, I found for-loop of Javascript works unexpected way. Let me describe it: <html> <head><head> <body> <script> ...
0 votes
0 answers
53 views

I have an Android app in Jetpack Compose. I have a screen where the user can create a new player. On this screen, the user can type in a Player name and select a color. Then, the user presses the ...
0 votes
2 answers
118 views

Imagine a composable A that haves a lower composable B that haves a even lower composable C with haves some buttons. The buttons must change a state remember variable stored in composable A. The state ...
0 votes
1 answer
80 views

I came across an example in React and I am trying to figure out how and why it works. function MyComponent() { return <h2>{name}</h2> } const name = "John"; export default ...
2 votes
2 answers
115 views

Here are the simple code: { function a() {} a = "test"; } console.log(a); I expected to get "test" but got "ƒ a() {}" in console. Why is that? Can anyone explain ...
0 votes
2 answers
355 views

I checked out Why can I use a function before it's defined in JavaScript?. and It says I can use functions before or after initialization when using Declaration Functions. However for the case of ...
hoo's user avatar
  • 93
0 votes
1 answer
63 views

I don't understand why for these same situations console returns two different outputs console.log(a); let a = 1; console says a is not defined and here function a1() { console.log(a); let a =...
user avatar
0 votes
2 answers
290 views

I am new to Jetpack Compose and am having a problem with the hoisting topic. I have created a very basic app with a button, the app displays the amount of times you have clicked the button. I have ...
0 votes
0 answers
65 views

Question I'm trying to understand why the following three JavaScript examples produce different outputs, even though they all seem to involve function hoisting. Shouldn't the outputs be the same based ...
klion's user avatar
  • 37

15 30 50 per page
1
2 3 4 5
...
31

AltStyle によって変換されたページ (->オリジナル) /