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">
    <!-- 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>
    <p id="my-heading">This is a first paragraph.</p>

    const heading = document.getElementById("my-heading");
    heading.style.color = "red";

    <!-- 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>


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

Top 25 Linux Commands for Users ?

In this tutorial i’m going to share Top 50 Important Linux Command for users with example. 1. Use of ls -la command. The ls -la command is…

How to use Global Variable using JavaScript in Laravel ?

What is Global Variable ? A global variable is a variable that is defined and accessible throughout the entire program or a significant portion of it, rather…

XAMPP: Starting ProFTPD…/opt/lampp/share/xampp/xampplib: line 22: netstat: command not foundfail.

In this tutorial we’re going to solve the error XAMPP: Starting ProFTPD…/opt/lampp/share/xampp/xampplib: line 22: netstat: command not foundfail. Solution :- Next to restart the server

SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: insert into `oauth_clients` (`user_id`, `name`, `secret`

In this tutorial we are going to solve error SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: insert into oauth_clients (user_id, name, secret error: –…

The Go-To Influencer Platforms for 2024

In the ever-evolving landscape of influencer marketing, one platform has risen above the rest to claim its throne as the reigning champion in 2024: WizBrand. With its…

Medical Tourism: A Distinguished Name in Worldwide Healthcare Travel

In the expanding world of medical tourism, certain websites have established themselves as distinguished names, offering unparalleled access to global healthcare services. These platforms serve as crucial…

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