Home Courses What is JavaScript? Client vs Server, History, Examples

What is JavaScript? Client vs Server, History, Examples

1 / 1

What is a Programming Language?


Just like humans need a language (Hindi, English) to communicate,

Computers also need a language called a Programming Language.

Examples:

  1. Java
  2. PHP
  3. Python
  4. JavaScript


Where JavaScript is Used

Mainly used for:

  1. Websites
  2. Web applications


Server vs Browser Execution

Server-Side Languages

  1. Examples:
  2. Java
  3. PHP
  4. Python
  5. C, C++


These languages:

  1. Run on the server
  2. Send output to the browser

Called Server-side scripting


JavaScript (Client-Side Language)

JavaScript:

  1. Code is sent to the browser
  2. Executes inside the browser

Called Client-side scripting


How Websites Work (Basic Idea)

Code is uploaded on a server

Users access it through a browser

Each website has a unique domain name

  1. Example:
  2. google.com
  3. youtube.com
  4. facebook.com


What JavaScript Can Do

  1. Show alerts (messages)
  2. Change text
  3. Change colors
  4. Perform actions instantly in the browser
  5. Create interactive and dynamic UI


Why Not Use Only JavaScript?

JavaScript has limitations.

Cannot do:

Database connectivity

Server-side file creation or modification

Can do:

UI changes (text, color, animations)

Display data

Handle browser-side actions


When Other Languages Are Used

For server-related tasks:

  1. PHP
  2. Python
  3. Java


Advanced Possibilities

JavaScript can also:

  1. Run on servers
  2. Build mobile apps
  3. Create software
  4. (Details will be covered later in the course)


Setup Requirement

No installation needed

Only a browser is required:

  1. Chrome
  2. Firefox


JavaScript History

First released in 1995

Created in just 10 days

Earlier names:

  1. Mocha
  2. LiveScript
  3. Then JavaScript

Initially had issues, improved over time

Still receives updates and new features


Conclusion

JavaScript can be used to build:

  1. Websites
  2. Mobile apps
  3. Software

It is an evergreen language

Its usage is continuously growing


Share this lesson: