system
Given the following post, respond as if you're commenting on Reddit:
human
How do I learn scripting languages?

The title pretty much says it but for some context.. I'm relatively proficient in Java and have a decent understand of OOP in general but when it come to scripting languages such as JS and python it seems to be a completely different paradigm that I just can't wrap my head around. When it's simple scripts like FizzBuzz I don't have any issues but as soon as I start to work on more complex applications I start to get lost or don't even know where to begin for individual tasks. Recently, I've been trying to develop a React app and I find as soon as I start to write some code I'll just get lost in a mess of my own spaghetti code. Any ideas or suggestions as to how I can get better at this style of programming would be greatly appreciated.
gpt
What you're really asking is how to structure an application. This is more about understanding and incorporating different design methodologies than understanding the nuts and bolts of a language (though there is considerable overlap.) 

This is actually where things get tricky, because there is no exact right answer for how you should make an application. If we think functionally and imagine our application as taking some input, doing something with it and producing a desired output, that "doing something with it" part could be done in a bunch of different ways. Some of these will be efficient, some of them will not be efficient, some of them will be following "best practices" and some of them won't. To be sure, if you would ask someone on the internet what the best way to it do was, you would get about 30 different opinions each one claiming to be correct. 

Ok, that's depressing to think about, at least it is for me, sometimes it's nice to have a clear cut, easy to follow path! However, this is essentially what makes computation non-trivial. Learning a language is not difficult in the grand scheme of things, it's using that language to solve problems and furthermore developing a skill set to understand the concepts of computation and computer organization so that you can do it efficiently that is difficult. 

This is a process you will be refining and perfecting your whole career. So where to start? As they they say, imitation is the best form of flattery, and a good place to start it's reading other people's code seeing how they structure it. The cliche is true, you will spend far more time reading code then writting it. There are also countless books and tutorials about this very topic, some with a much more general flavor and others that are more specific towards particular languages like JavaScript or Python as you mentioned those are the languages that were giving you trouble. 

One thing to keep in mind when you're beginning is that it's okay if your code is spaghetti and a mess. Obviously you want clean, efficient and readable code, but that's a skill and it takes time to develop how to write that way. Just getting the stupid thing to work and produce the correct output is a fantastic first step. However, don't get lazy and just stop there! Refactoring your code is really important for developing good habits. You got it working, fantastic! Now go back and start cutting out the fat, un-spaghettifi it so to speak. As you learn new methodologies and design principles, go back again and try to incorporate them in your old code. 

It's a long process, with many pitfalls and suggestions of what it the best way forward, but if you keep at it you will find success.