0% found this document useful (0 votes)
12 views2 pages

JavaScript Summary Notes

JavaScript is a versatile, dynamically typed programming language used for both client-side and server-side development, integrating with HTML and CSS. It features single-threaded execution, asynchronous capabilities, and a rich ecosystem of libraries, making it suitable for web and game development. However, it has limitations such as security risks and performance issues compared to compiled languages.

Uploaded by

sswastik60
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)
12 views2 pages

JavaScript Summary Notes

JavaScript is a versatile, dynamically typed programming language used for both client-side and server-side development, integrating with HTML and CSS. It features single-threaded execution, asynchronous capabilities, and a rich ecosystem of libraries, making it suitable for web and game development. However, it has limitations such as security risks and performance issues compared to compiled languages.

Uploaded by

sswastik60
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
You are on page 1/ 2

JavaScript Summary Notes

- Introduction to JavaScript
- Versatile, dynamically typed programming language.
- Supports both client-side and server-side development.
- Integrates with HTML, CSS, and a rich standard library.

- Language Characteristics
- Single-threaded: Executes one task at a time.
- Interpreted: Code runs line by line.
- Dynamically typed: Variable types are determined at run-time.

- Hello, World! Example


- In Browser:
<script>
console.log("Hello, World!");
</script>
- Written in <script> tag.
- Output shown in browser's developer console.
- In Server (Node.js):
console.log("Hello, World!");
- Saved in .js file and run via Node.js terminal.

- JavaScript Comments
- Single-line: //
- Multi-line: /* ... */

- Key Features
- Client-side scripting: Runs in browser.
- Versatile: Supports a wide range of tasks.
- Event-driven: Responds to user actions.
- Asynchronous: Non-blocking, e.g., AJAX, fetch.
- Rich ecosystem: Libraries/frameworks (React, Angular, Vue.js).

- Client-Side vs Server-Side
- Client-Side:
- Interacts with DOM, handles user input.
- Examples: React, Angular, Vue.
- Server-Side:
- Interacts with DBs, files, APIs.
- Uses Node.js, Express.js.

- Programming Paradigms
- Imperative: Focus on how to perform tasks (procedural, OOP).
- Declarative: Focus on what needs to be done (e.g., arrow functions, JSX).

- Applications
- Web Development: Interactive UIs.
- Web Apps: Google Maps, Gmail.
- Server Apps: APIs, backend logic.
- Game Development: HTML5 + JS.
- Smart Devices: Pebble JS for smartwatches.

- Limitations
- Security risks: XSS attacks possible.
- Performance: Slower than compiled languages for heavy tasks.
- Complexity: Advanced use requires deep knowledge.
- Weak typing: Can cause runtime errors.

- Why JavaScript is Lightweight


- Low CPU usage, minimalist syntax.
- No need for explicit data types.
- Runs efficiently in browsers.
- Easy to learn and implement.

- Compiled or Interpreted?
- Both: Modern JS engines use Just-In-Time (JIT) compilation.
- Interpretation: Executes line-by-line initially.
- Hot Code Detection: Identifies frequently used code.
- Compilation: Converts hot code to machine code.
- Execution: Machine code runs faster than interpreted code.

You might also like