DEV Community

vidhya murali
vidhya murali

Posted on

JavaScript Day-1

What I learned Today in JavaScript,Let's learn Together.

1, JavaScript
JavaScript (JS) is a high-level, dynamic, and multi-paradigm programming language primarily used to create interactive and dynamic content on the web. It serves as one of the core technologies of the World Wide Web, working alongside HTML (which defines the structure) and CSS (which handles the layout and styling) to bring static web pages to life.

Core Features

  • Interpreted & JIT Compiled: Browsers receive the code as plain text and execute it line-by-line using a built-in interpreter. Modern engines use just-in-time (JIT) compilation to transform code into a faster binary format during runtime.

  • Dynamically Typed: Variable types are determined automatically at runtime rather than being declared explicitly in the code.

  • Single-Threaded & Asynchronous: It executes one task at a time on a single main thread, but uses an event loop to handle asynchronous tasks like fetching data without freezing the user interface.

  • Multi-Paradigm: It supports object-oriented, functional, imperative, and procedural programming styles

JS interacts with the Document Object Model (DOM) to update website content in real time.

Common use cases include:

  • Adding Interactivity: Powering dropdown menus, image carousels, popup windows, and zoomable maps.
  • Form Validation: Checking user inputs like email formats or credit card numbers before data is submitted to a server.
  • Dynamic UI Updates: Refreshing content (such as social media feeds or instant message updates) automatically without requiring a full manual page

Scripting Language

  • A scripting language is a specific type of programming language used to automate tasks, control existing software applications, and generate dynamic content without requiring a distinct compilation step.
  • Unlike traditional compiled languages, scripting languages are interpreted line-by-line at runtime by another program known as an interpreter. All scripting languages are programming languages, but not all programming languages are scripting languages

Programming Languages

[Programming is telling a computer what to do.]

  • A programming language is how we write code, what keywords we use, to tell the computer what to do.
  • Different programming languages are used for different purposes, like JavaScript is good for web development, Python is good for AI, and C/C++ is good for programming microcontrollers.

Top comments (0)