Just how much difficulty that you have in learning JavaScript is going to depend on what you already know before you start. There are some things that you must know before you can start learning JavaScript.
JavaScript can be run in a number of different ways. The most common way that JavaScript is run is as a part of a web page. In order to be able to write JavaScript that interacts with a web page you must first understand HTML. A familiarity with CSS is also useful prior to starting to learn how to write JavaScript to run in a web page.
Comparing JavaScript to HTML.
HTML is a markup language. To use it you start with the content for your web page and wrap each of the pieces of that content inside HTML tags that identify what that content is. Most people have a reasonably good isea of what paragraphs, headings, lists etc long before they come across HTML and so learning a markup language such as HTML is relatively straightforward sine the main thing that you need to learn to use a markup language is the particular way that the language uses to do the markup. In the case of HTML the markup is enclosed within < > symbols with the tag name appearing first followed by a series of attributes. The closing tag to match an opening tag is identified by placing a slash in front of the tag name.
JavaScript is not a markup language, it is a programming language. That by itself is enough to make describing JavaScript a lot more difficult than it is to describe HTML. While a markup language describes what something is, a programming language defines a series of actions that are to be performed. Each of the commands that are written in JavaScript will define an individual action which can be anything from copying a value from one place to another, performing calculations on something, testing a condifion, or even providing a list of values to be used in running a long series of commands that have been previously defined.
As there are lots of different actions that can be performed and those actions can be combined in lots of different ways, learning any programming language is going to be more difficult than learning a markup language because there is a lot more that you need to learn.
There are also ways though in which learning a programming language is easier. To be able to properly use a markup language you need to learn the entire language. Knowing part of a markup language without knowing the rest means that you cannot mark up all of the page content correctly. Knowing a part of a programming language means that you can write programs that use the part of the language that you know to create programs.
While JavaScript is a lot more complex than HTML, you will be able to start writing useful JavaScript far quicker than you took to learn how to correctly markup web pages with HTML. It will however take you a lot longer to learn all of what can be done with JavaScript than it took to learn HTML.


