Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
April 16, 2024 05:55 pm GMT

Day 1 of 30 of JavaScript

Hey folks :) I hope you are doing fine. In this 30 days of JavaScript we are going to learn all about JavaScript from beginner to gradually going to advancement. I'll be sharing my knowledge in simple and understandable way. So let's get started ...

But hey don't get confused with Java and JavaScript they both are much different languages. Now we are good to go.

Image description

JavaScript is one of the most important and popular programming language. It has many areas of application. It is used everywhere from web development to blockchain. Also it is an easy language to learn.

JavaScript was invented by Brendan Eich in 1995.

What is JavaScript?

JavaScript is a cross-platform, object-oriented programming language used by developers to make web pages interactive.
Imagine a website as a house. HTML gives it structure like walls, doors, and windows, while CSS makes it look nice with paint and decorations. JavaScript is like the electricity that powers everything inside.
In simple words, JavaScript is the language that makes websites do cool stuff, making them more than just static pages but interactive experiences for users.

Features of JavaScript

  1. JavaScript is a structured programming language.

  2. It is a light-weighted and interpreted language.

  3. It is a case-sensitive language.

  4. JavaScript is an object-oriented programming language that uses
    prototypes rather than using classes for inheritance.

  5. JavaScript is supportable in several operating systems
    including, Windows, macOS, etc.

Application of JavaScript

JavaScript has wide area of application.

  • Web Development -: JS allows developers to create a dynamic and interactive web page to interact with visitors and execute complex actions. Some famous websites built by the use of JavaScript are Google, YouTube, Facebook etc.

  • Web Application -: Various JavaScript frameworks are used for developing and building robust web applications.Netflix and PayPal were developed with AngularJS JavaScript framework and Application Programming Interfaces (APIs).

  • Server Applications -:JavaScript is also used to write server-side software through Node.js open-source runtime environment.Top companies like Walmart, PayPal, Uber, GoDaddy, and many more have adopted Node.js for server infrastructure.

  • Web Servers -: Node.js allows developers to use JavaScript to create a web server.

But this is not it there are many more applications of JavaScript.

How to use JavaScript in Webpage?

So there are two ways to use JavaScript in webpage.

  1. The Tag</strong> -&gt; In HTML, JavaScript code is inserted between <code>&lt;script&gt;</code> and <code>&lt;/script&gt;</code> tags.</li></ol><p>Example -&gt;<br><code>&lt;script&gt;<br> console.log(&quot;Hello world&quot;)<br>&lt;/script&gt;</code></p><p>Scripts can be placed in the <code>&lt;body&gt;</code>, or in the <code>&lt;head&gt;</code> section of an HTML page, or in both. But I&#39;ll say place it in the last in <code>&lt;body&gt;</code> as placing script in starting will slow your website as initially all the script will load first , so it is better we place it in end.</p><ol><li><strong>Using external JavaScript</strong> -&gt; It is a better approach to define the complete JavaScript code in another file as it will give simplicity and good structure to whole of your code. This is how it can be done -:<code>&lt;script src=&quot;script.js&quot;&gt;&lt;/script&gt;</code></li></ol><p>The script will behave as if it was located exactly where the <script> tag is located.</p><p>So this is it for this tutorial. In the next post we will be learning about how outputs are displayed in JavaScript. Till then stay connected and don&#39;t forget to follow me.</p>

Original Link: https://dev.to/akshat0610/day-1-of-30-of-javascript-5hn1

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To