DEV Community

Lakshmi Pritha Nadesan
Lakshmi Pritha Nadesan

Posted on

Day 1 - Javascript Introduction

What is Javascript?

JavaScript is a high-level, interpreted programming language commonly used for building interactive and dynamic websites.

It's one of the core technologies of the web, alongside HTML and CSS.

While HTML structures the content of web pages and CSS styles it, JavaScript is responsible for adding behavior and interactivity.

Why Javascript?

There are several reasons why JavaScript has become one of the most popular and widely used programming languages in the world, especially for web development.

Here are some of the key reasons why developers choose JavaScript:

  1. Runs Everywhere (Cross-Platform)
  2. Client-Side Interactivity
  3. Rich Ecosystem and Libraries
  4. Huge Developer Community
  5. Asynchronous Programming 6.Flexibility
  6. Easy to Learn and Use
  7. Full-Stack Development (Single Language)
  8. Popular with Modern Web Development
  9. Job Demand and Career Opportunities
  10. Constantly Evolving

Application of javascript:

  1. Web Development (Frontend)
  2. Backend Development (Server-Side)
  3. Mobile App Development
  4. Game Development
  5. Desktop Application Development
  6. Internet of Things (IoT)
  7. Machine Learning & AI
  8. Data Visualization
  9. Web Automation and Scripting
  10. Virtual and Augmented Reality
  11. Blockchain and Cryptocurrencies

How to use Javascript in HTML:

There are two primary ways to include JavaScript in an HTML document:

Inline JavaScript: Directly inside the HTML tags.
External JavaScript: Linking to an external .js file.

Using Inline JavaScript in HTML:

You can add JavaScript directly within the HTML elements, using the onclick, onmouseover, onchange, and other event attributes. You can also include JavaScript code inside the script tag.

Using External JavaScript in HTML:

For better code organization, you typically separate JavaScript from HTML by placing it in an external .js file. This is especially useful for larger projects, as it makes your code more maintainable.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay