0% found this document useful (0 votes)
2 views4 pages

History: What Is Javascript?

JavaScript, created by Brendan Eich in 1995, is a high-level, interpreted programming language designed for adding interactivity to web pages. It is dynamically typed, object-based, and supports both client-side and server-side execution through environments like Node.js. Key features include its ease of use, single-threaded architecture, and the ability to handle various data types, including primitive and non-primitive literals.

Uploaded by

vivekkhole11
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

History: What Is Javascript?

JavaScript, created by Brendan Eich in 1995, is a high-level, interpreted programming language designed for adding interactivity to web pages. It is dynamically typed, object-based, and supports both client-side and server-side execution through environments like Node.js. Key features include its ease of use, single-threaded architecture, and the ability to handle various data types, including primitive and non-primitive literals.

Uploaded by

vivekkhole11
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

History

1. JavaScript was first created by Brendan Eich in just 10 days in May 1995 while he was working

at Netscape Communications Corporation.

2. The initial release was called Mocha and later renamed to LiveScript, and finally JavaScript.

3. Initially, JavaScript was designed to be a lightweight scripting language for adding interactivity

to web pages.

4. At the time, web pages were mostly static and lacked interactivity, and the only way to add

dynamic content to a web page was to use a server-side programming language like PHP or Perl.

5. However, this approach had limitations and was not well-suited to creating responsive,

interactive user interfaces.

6. The idea behind JavaScript was to create a scripting language that could be executed on the

client-side (in the user's web browser) and could be used to add interactivity to web pages.

7. This allowed web developers to create more engaging and interactive websites, without having to

rely on server-side programming languages.

What is JavaScript?
JavaScript is a high-level, interpreted (or Just-In-Time compiled), dynamically typed, LosselyTyped
programming language used to create interactive and dynamic web applications. It runs in web
browsers and also on servers using environments like [Link].

High-level language
• Easy for humans to read and write.

Interpreted / JIT Compiled


• JavaScript engines (like Chrome's V8) don't compile your code into a separate executable.
• Instead, they parse and execute it, using Just-In-Time (JIT) compilation to optimize
performance while the program runs.

Dynamically typed
• You don't declare variable types.
• The type is determined at runtime.
Introduction
1. Javascript is scripting and programming language.

2. It is purely object based [Link] means that variables, functions, and even primitive data
types like numbers and strings are object,everything is object in javascript.

3. It is dynamically typed language , it means type of value stored in memory block is checked at
runtime because of this nature we can store any type of value in variable.

4. It is object oriented programming language , it means we can create our own object. (It is not
purely object oriented programming language)

5. It is interepreted language

6. It is synchronous language , it has single threaded architecture. Instructions get executed line by
line.

7. Js is used to add functionality to website.

Javascript Runtime Environment


1. JavaScript Runtime Enviroment provides the enviroment where we can run our JavaScript code.

2. Two javascript runtime enviroments are : I. Browser II. [Link]

Features of JavaScript
1. **Scripting Language**: -

**What it means**: JavaScript is used to write small programs that automate tasks in web pages. -
**Why we call it that**: It helps make web pages interactive. For example, it can change text when
you click a button or show a pop-up message.

2. **High-Level Language**: -

**What it means**: JavaScript is easy for humans to read and write. –

**Why we call it that**: You don’t need to know the details of how the computer works to use

JavaScript. It uses simple commands and is close to human language, making it accessible for
beginners.

3. **Synchronous Language**: -

**What it means**: JavaScript runs commands one after another, in order. –

**Why we call it that**: When you write JavaScript code, it does each task step by step, making it

easier to understand what’s happening in your program.


4. **Object-Based Language**: -

**What it means**: JavaScript uses objects to store and organize data and functions. –

**Why we call it that**: In javaScript most of the things are are internally objects. Objects help keep
related code together. For example, you can have an object for a car that includes properties like
color and methods like drive.

5. **Object-Oriented Language**: -

**What it means**: JavaScript supports creating complex structures using classes and objects. -
**Why we call it that**:We can create our own objects using classes in javascript.

6. **Loosely Typed Language**: -

**What it means**: In JavaScript, you don’t have to specify what type of data (like a number or text)
a variable holds. Also we don’t need to follow the syntax very strictly eg. No need to write
semicolons. –

**Why we call it that**: This makes writing code faster and easier because you don’t have to worry
about declaring data types and don’t need to strictly follow the syntax. You can just start using
variables right away.

7. **Dynamically Typed Language**: -

**What it means**: The type of data a variable holds can change as your program runs.

**Why we call it that**: You can have a variable that starts as a number and then later hold a string
(text) without any extra work. This flexibility makes JavaScript powerful for writing dynamic
programs.

8. **Single-Threaded Language**: -

**What it means**: JavaScript can only do one thing at a time.

**Why we call it that**: This simplicity makes it easier to write and understand JavaScript code. Even
though it does one task at a time, JavaScript can handle many tasks quickly by using techniques like
callbacks and promises.

Tokens
1. It is the smallest unit of programming language.

2. We have 5 types of operators ,punctuators/Separators ,keywords ,identifiers , literals.

Literals
These are values/data used in our program

Types Of Literals / Datatypes


1. Primitive

2. Non-Primitive
Primitive Literals
1. In JavaScript, a primitive data type is a data type that represents a single value.

2. JavaScript treats primitive values as immutable values, means that their value cannot be changed

3. We have 7 primitive types of literals - number , bigint , boolean , undefined , null , symbol , string.

1. Number
• This data type represents a numeric value. It can store both integers and floating-point
values.

2. BigInt
• It is used to represent integers that are larger than the Number data type
• To represent the given integer as bigint , we have to suffix 'n' after the integer.
• Example : 10 is number type and 10n is bigint type.

3. Boolean
• This datatype represents a logical entity and can only have two values: true or false.

4. Null
• This datatype represents a null or empty value.
• It is used to mark the memory block empty intentionally.

5. Undefined
• This datatype represents an uninitialized value.
• When memory block is unintialized , js engine implicitly initialize that memory block with
'undefined' in variable phase.
• For variable declared with 'var' it will initialize it in variable phase
• For variable declared with 'let' and 'const' it will not initialize it in variable phase.

6. Symbol
• It represents a unique identifier.
• We have Symbol function which is used to generate unique idenitifiers in our program.

7. String
• It represents collection of characters
• In Js We declare String in 3 ways like Double Qutoes(“ ”) single quotes(‘ ‘) backticks(``)

You might also like