[go: up one dir, main page]

0% found this document useful (0 votes)
7 views17 pages

JAVA SCRIPT Learn Final Content

JavaScript is a programming language used for creating web applications, released in 1995, and applicable for both front and back end development. The document covers foundational concepts such as printing to the console, variables, constants, data types, type conversion, functions, and object manipulation. It also discusses advanced topics like array methods, loops, and the use of constructors in JavaScript.

Uploaded by

Sakthi Vel
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)
7 views17 pages

JAVA SCRIPT Learn Final Content

JavaScript is a programming language used for creating web applications, released in 1995, and applicable for both front and back end development. The document covers foundational concepts such as printing to the console, variables, constants, data types, type conversion, functions, and object manipulation. It also discusses advanced topics like array methods, loops, and the use of constructors in JavaScript.

Uploaded by

Sakthi Vel
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/ 17

JAVA SCRIPT

What is javascript?
--Java Script is a programming language. It’s used to create a any web
application.
--1995 javascript was realsed
--It’s used to develop front & back end applications

CHAPTER 1
1.Printing in console
console.log(“Hello World”)

2.Variables
--Reuse and that’s the power of variables from any where in coding
environment
--use the same data multiple times
let num=2+2
let-keyword
num-variable
=-assignment operator
2.1How the variable name should be in clen manner
i-snake casing rule

ii-camel casing rule

3.constant
constant, once declared, cannot be modified by the user.
For example,
Const pi = 3.14;
sets the value of pi, and after that, it cannot be changed.

4.Data Types
4.1 typeof (finding which datatype will be used in js)
let num = 7.8;
console.log(num); // This will print the value of num (7.8)
console.log(typeof num); // This will print the data type of num (number)
--let num = 7.8; declares a variable num with the value 7.8.
--console.log(num); prints the value of num (which is 7.8).
--console.log(typeof num); prints the data type of the variable num, which will
output number because 7.8 is a floating-point number in JavaScript.

4.2 big Int

n--it will be represented by big int.

5.Escape Sequence
5.1.1 escape sequence \”hai\”

console log will print


Navin Reddy “Telusko”
5.1.2 new line \n
console log will print
Navin
Reddy
5.1.3 tab space \t

Console log will print

6.Type Conversion
6.1int to string

In JavaScript, type conversion between int (integer) and string is also


straightforward. JavaScript has automatic type conversion (also known as
type coercion), but you can explicitly convert between types using built-in
functions.

6.2 string to int


7.=== Strict equality operator

== it will be compare the values only


=== it will be compare the data type also

8.tempalte literal in js
`` its called back tick

9.while and do while


10.objects in javascript
Basic Syntax for object
let alien={}
Console.log(typeof alien)//object

11.Complex Object
12.delete a object properties

13.for in loop( using objects print one by one like for iteration)
In this for in loop want to console object with properties with the help of for in
loop
14.Functions in JavaScript(basic Structure)

//you called greet function

15.Funtions return

16.Function Passing
17.function Expression

18.local and global variable

19.how to reduce function with the arrow function keyword of(=>)


In this arrow function it will be only one function no need to return anything
just add a expression here in straight forward

20. Accessing within object to the function

21. How to function to access object properties


22.this keyword

23.pupose of compare keyword

//console output i9
23.Constuctor in JS
Constructors in JavaScript are generally functions where the first letter of the
function name is capitalized. This is a convention to help identify
constructors easily (though it's not required, but it is good practice).
When you use the new keyword, JavaScript knows you're referring to a
constructor function, which will return a new object instance.

24.How to create a array and array methods


25.for of loop method
This for of loop same functionality done by for in loop only diff is for of loop
includes to print undefined.
But for in loop eliminate the undefined condition

26.forEach method
In forEach is a method in this forEach method need to pass a function and
parameter will assigned inside a parameter .that parameter will be performed
multiple operation
n-value of current index array
i-index of for each loop
nums-array elemt will be print
27.filter() method

This arrow function will be return true or false


28.MAP
In this scenario even number will take the forEach function one by one with
the helpof the filter function

FILTER VALUE MOVED TO MAP WILL CATCH UP AND DOUBLE IT


29.reduce()
In forEach method access only by multiple values .but reduce method access
through the only one values

In this method contains a array of elements it only takes a positive number


and number multiply by 2 and reduce function start running map value a & arr
v
30.Set()

In this has function same as for the .contains in set in java if present meams
return true or else return false
31.map()

It will print only key in console

.get function used to access the value with the helpof the key value

Loop iteration through loops using for of loop

You might also like