0% found this document useful (0 votes)
22 views

Javascript - Part 01

Uploaded by

Syed zakir
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)
22 views

Javascript - Part 01

Uploaded by

Syed zakir
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

Part 01: Notes on JavaScript

Basics

Visite: 10xTech Infinity

1. Console.log
The console.log() function is used to print output to the console. It's commonly
used for debugging and displaying information.

console.log("Hello World");

2. "use strict"
The "use strict"; statement enables strict mode in JavaScript. It helps catch
common coding errors and prevents the use of certain error-prone features.

3. Variables
Variables are used to store and manage data in JavaScript. They can be declared,
used, and changed as needed.

Declaring a variable:

var firstName = "MANOJ KUMAR";

Using a variable:

console.log(firstName); // MANOJ KUMAR

Changing a variable's value:

Part 01: Notes on JavaScript Basics 1


firstName = "BCA PATHSHALA";
console.log(firstName); // BCA PATHSHALA

4. Variable Naming Rules


Cannot start with a number (e.g., 1value is invalid, but value1 is valid)

Can use underscore (_) or dollar symbol ($) (e.g., first_name , $firstname )

Cannot use spaces

Convention: Start with a small letter and use camelCase (e.g., firstName )

Examples of valid variable names:

var value1 = 10;


var first_name = "Manoj";
var _lastname = "Kumar";
var first$name = "Rohit";
var $firstname = "Jain";

5. Variable Naming Conventions


Snake case: first_name

Camel case: firstName (recommended for JavaScript)

These notes cover the basics of using console.log, strict mode, variable
declaration, usage, and naming conventions in JavaScript.

Part 01: Notes on JavaScript Basics 2

You might also like