MainMenu

Home Java Overview Maven Tutorials

Sunday, 3 November 2024

Java Script Tutorial 1 -- Introduction of java script, Syntax of Java Script




JavaScript Introduction 1:

JavaScript is a high-level, versatile programming language primarily used to create interactive effects within web browsers. Developed by Netscape, it was initially named LiveScript before being renamed JavaScript.

Key aspects of JavaScript include:

Client-Side Scripting: JavaScript is primarily used for client-side web development, allowing developers to create dynamic content that interacts with users, modifies the content of web pages, and responds to events triggered by users' actions (like clicks, form submissions, etc.).

Object-Based Language: JavaScript is object-based, meaning it uses objects and their properties to build scripts and functionalities. Objects in JavaScript can be predefined (like Date, Math, etc.) or custom-defined by developers.

Versatility: Originally created for web browsers, JavaScript has expanded its scope and can now be used for server-side development (Node.js), mobile app development (React Native, NativeScript), game development (using frameworks like Phaser, Three.js), and more.

Syntax: The syntax of JavaScript is similar to other programming languages like Java and C, making it relatively easy to learn for those familiar with programming concepts.

Interactivity and Dynamic Content: JavaScript allows for the creation of interactive elements on web pages, such as form validation, animations, dynamic updates without reloading the page (AJAX), and more.

Libraries and Frameworks:There are numerous libraries and frameworks built on top of JavaScript (e.g., jQuery, React.js, Angular.js, Vue.js) that simplify and streamline the development process, providing reusable components and enhancing the functionality of JavaScript.

Cross-Browser Compatibility: JavaScript is supported by all major web browsers like Chrome, Firefox, Safari, and Edge, ensuring cross-browser compatibility for web applications.

JavaScript plays a crucial role in modern web development, allowing developers to create rich, interactive, and user-friendly web experiences. Its versatility and widespread adoption have made it an integral part of web development ecosystems.




JavaScript Syntax :


0. Use the curly braces ({}) to create a block that groups one or more simple statements.

1.Javascript ignore the white spaces

2.In javascript (“;” ) used to end a statement and it is optional

3.Single line comment like “//”

4. Multiple line comment should be like “/* …… */”

For Example :

console.log("chandan");
let a = 10;
let b = 20;
//console.log(a+b);
console.log(a+b+30);
/*console.log("comment me)
console.log("comment me")
console.log("comment me")*/



No comments:

Post a Comment