snxxwyy
KPCKevin Powell - Community
•Created by snxxwyy on 1/16/2025 in #os-and-tools
vim | extra files
like dys says, if they're backups then i understand why they're there, but i feel that could clutter pretty easily eventually haha
10 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/16/2025 in #os-and-tools
vim | extra files
i'm not sure if anything went wrong? here's an example. That file just stays there, and sometimes there's more like in the pic.
10 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
ohh okay
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
Ah okay, so logic wise, so it’s essentially the main value you receive that you pass on?
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
Ah okay I see, so with the resolve and reject values, you just pass in any variable or variables that’s useful or that you need in the .then function?
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
And I gather that’s because you’re not chaining a new
.then
on to the one in the variable, you’re chaining it as though it’s the first, hence why it inherits that value from it (undefined) and not from any others you’ve done?122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
gosh everything is very complex with js haha
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
ahh okay
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
ah okay, but the scalar can include methods?
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
oh okay so i assume by this you mean that since everything in js is an aboject, you're able to call this because this method is included in the object but if you were to call something that wasn't it wouldn't work since there's no return?
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
Ah. But since I’m chaining on a method to the variable then the variable must return something in order to be equal to it in the chain right?
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
so assigning a variable is actually a function with a return of the variable value?
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
i was looking more into this as well, if i run a method on a variable with a number then it works of course, which must mean it returns something, but how would that return be represented since i assume it wouldn't just be
return xyz
at the bottom of a function since it's a variable?
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
ah okay then
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
so i don't necessarily have to fetch something in there, i can add two numbers for example if i want that to run asynchronously for some reason?
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
i was just thinking, if promises are mostly used to retrieve info from another source, most functions/methods that allow for that such as
fetch
already return promises, so is there really a need to write them fresh yourself when you can just chain on a .then
to fetch
for example?122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
ah okay i see, i see
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
ah okay. What if you chain a method on to a function that doesn't return anything? will it just not do anything or be smart enough to gather a value?
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
ohh okay i see, thanks
122 replies
KPCKevin Powell - Community
•Created by snxxwyy on 1/14/2025 in #front-end
Promise questions
apologies for the ping. Do you know of any resources where i can look into the functionality of that form of chaining where it's replaced with it's result? When i try to look for it it just comes up with adding multiple methods on the same line like .x.y.z haha
122 replies