A brief introduction to Javascript

Now that we know what javascript is, at least a kind of sense, let's see other parts of it. In other words, what do we use it for? And to answer that question, let's look at the following.

The role of Javascript in Web Development

HTML, CSS and Javascript are the three core technologies of the web. These three technologies all work together to create beautiful, interactive, and dynamic websites or web applications.

To be precise, the HTML is responsible for the page's content; the text, images, buttons, and all other content you see on the page is always written in HTML.  Then the CSS is responsible for the presentation of the content. So, styling, colours, and or laying out the elements of the webpage. And then finally, Javascript is the simple programming language of the internet; it allows the developers to add dynamic and interactive effects to any webpage. We also use javascript to manipulate the content or CSS, load data from remote servers and build an entire application in the browser, which we then call a web application.

We can also use the analogy of the Nouns, Adjectives and Verbs to HTML, CSS and JS, respectively.
<p>Content that is displayed on the browser </p>
Example HTML code, <p></p> means "paragraph"; acting as noun
p {color: red}
Example CSS code, meaning that paragraph text is "red" in colour, acting as an adjective.
Example JS code, meaning "hide" the paragraph content; acting as a verb.

Okay? Does that make sense? Don't worry about the code of HTML, CSS, and JS. Try to get the intuition behind these building blocks of these core web technologies.

A more inclusive example

To be precise, most of you are already familiar with javascript in real-life web applications. Let's take an example from Twitter. If you access Twitter in a new tab, you can probably see some loading spinners, right? These loading spinners are javascript doing something in the background, like fetching news or displaying user data. Once the data has been received, javascript hides these spinners and loads the content it fetched.  This is a superb example of manipulating styles and content.

Not just this, there is also a simple dynamic effect on this home page. Most of the time, you even have a unique or completely different home page; this is also the work of javascript displaying dynamic data. Javascript also displays the user information whenever you place or hover your mouse on one of the users' profiles.

There is nothing you can't do with Javascript.

Well, almost nothing you can't do with Javascript is a very bold statement, but it holds. Probably there might exist a better alternative or optimised way of doing this.

To recap, Javascript allows us to add dynamic effects to pages; We can build an entire web application in the browser. So, we can say that javascript made modern web development and the whole modern web itself possible in the first place. Now, suppose you are already familiar with the modern web development industries. In that case, you probably are familiar with Javascript libraries and frameworks such as React, Angular, Vue, and if you don't, that's no problem. All you need to know is that these basic tools make writing modern, large-scale web applications a lot easier.

Now what matters here is that all these libraries and frameworks are still 100% based on and powered by javascript itself. This means that you should be good at javascript before learning and using any of these frameworks and not just jump into your first framework after you know how to write, like, ten lines of javascript.

You've successfully subscribed to Leewardslope
Great! Next, complete checkout to get full access to all premium content.
Error! Could not sign up. invalid link.
Welcome back! You've successfully signed in.
Error! Could not sign in. Please try again.
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.