What is Model ? Object Model in JavaScript ?

What is Model ?

A model is a representation of a real-world entity or concept. It can be used to describe the structure and behavior of the entity or concept. A model can be represented in many different ways, such as text, diagrams, or code.

An object model is a way of representing data and behavior using objects. Objects are self-contained entities that have both data and behavior. The data is represented by the object’s properties, and the behavior is represented by the object’s methods.

JavaScript is an object-oriented programming language, which means that everything in JavaScript is represented by an object. This includes primitive data types such as numbers and strings, as well as more complex data structures such as arrays and objects.

The JavaScript object model is a powerful way to organize and manage data. It allows you to create reusable components and to encapsulate data and behavior. This can make your code more modular and easier to maintain.

Document Object Modal ?

The document Object Model (DOM) is a application Programming Interface (API) for HTML and XML documents, with the document Object Model, programmers can create and build documents, navigate their structure, and add, modify or delete elements and content.

Example :-

<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">

    <title>Hello, world!</title>
  </head>
  <body>
    <p id="my-heading">This is a first paragraph.</p>

    
   <script>
    const heading = document.getElementById("my-heading");
    heading.style.color = "red";
   </script>

    <!-- Option 1: Bootstrap Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>

    
  </body>
</html>

Output: –

Hi I am Amit Kumar Thakur Experienced as s Software Developer with a demonstrated history of working in the information technology and services industry. Skilled in HTML, CSS, Bootstrap4, PHP, Laravel-9 , REST API,FB API,Google API, Youtube Api, Bitbucket,Github,Linux and jQuery. Strong engineering professional focused in Computer/Information Technology Administration and Management. Currently my profile is to Software Developer, analyze the requirement, creating frame for web application, coding and maintenance.

Related Posts

Discover Bengaluru with Bangalore Orbit: Your Ultimate Travel Companion

Introduction: Bangalore Orbit is your comprehensive guide to exploring Bengaluru and its enchanting surroundings. From tourist destinations to city events, tours, and travel blogs, Bangalore Orbit ensures…

Why DevOps Consulting is Critical for Startups

In the fast-paced world of startups, agility, efficiency, and rapid innovation are paramount for success. DevOps practices, which integrate development and operations to streamline workflows and accelerate…

How to Prepare for a DevOps Consulting Engagement

Embarking on a DevOps consulting engagement is a strategic move that can transform your organization’s IT operations, enhance efficiency, and accelerate innovation. Proper preparation is crucial to…

How to Install Drupal 10 on Linux ?

In this tutorial we’re going to learn how to install Drupal 10 on Linux server. Follow this tutorial i have installed and run the project in very…

Best DevOps Freelancer in the World

In the dynamic and ever-evolving world of DevOps, finding individuals who not only excel in their technical capabilities but also lead with innovation and insight is rare….

File structure of drupal | Basic Directory Structure of a Drupal ?

What is Drupal ? Drupal is a popular open-source content management system (CMS) written in PHP and built upon the Symfony framework. It is used worldwide to…

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x