« first day (4501 days earlier)      last day (449 days later) » 

4:32 AM
 
 
5 hours later…
10:00 AM
I'm new to JavaScript (I've been learning Java lately). One thing that is different about JS is that strings are primitives here. Despite that, strings have methods (toUpperCase() and so on), like objects. It raises the question: if primitives in JS can also have methods, what's the difference between primitives and objects in JS?
@Wietlol by the way, I want to thank you for that advice, if I haven't yet. Codecademy helped me a great deal. There would have been a great chance I'd abandon it altogether if I hadn't found a novice-friendly education platform like the one you suggested 🙏
 
 
1 hour later…
11:19 AM
@SergeyZolotarev Primitives are immutable. Also you can't meaningfully extend them (well you can extend them but it's hacky and often times not useful). You can however build up more complex objects from primitives. E.g., person = { name: "Fred", age: 42 }
To be honest, not much different from Java. Only strings are objects there. But int and char are primitives. And a string object is implemented as an immutable char array to allow for the different string methods.
JS just skips the requirement to directly use the wrapper in order to manipulate a primitive. Integer.toString(n) in Java is achieved via n.toString() in JS. Which is a shortcut for basically the same result. No need to deal with the wrapper to get there.
 
11:42 AM
But both vars and lets can be reassigned, can't they? Why did Codecademy phrase it that way? 🤔
 
11:56 AM
@SergeyZolotarev Probably because you shouldn't be using var. I suppose they only show off let and const so from those two let can be reassigned.
 
 
3 hours later…
2:51 PM
If I run into Cross-Origin Request Blocked messages when sending XMLHttpRequests while loading the exact same page from the same browser manually works and I don't have admin access to the server, am I completely out of luck?
I've already set the request header, but the CORS request did not succeed.
I'm halfway posting an SO question about it, but I think I've either 1) misunderstood the severity of the problem or 2) used the wrong library.
All I want is to download the results of a thousand JSON requests :-)
 
 
6 hours later…
8:49 PM
I asked a question related to asars a couple days ago but hasn't been viewed much. I was hoping if I could get help quicker... Can someone take a look?
0
Q: How to unlock an asar file that's being used by that same application?

12944qwertyI have an asar file that is read from an electron app. From the same app, I want to delete this asar file, however I keep getting an EBUSY error. I have found only two places where this asar file is read: A file protocol. It reads a file that is in the asar. foo://fileinasar.js for example. file...

 

« first day (4501 days earlier)      last day (449 days later) »