JAVA SCRIPT Learn Final Content
JAVA SCRIPT Learn Final Content
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
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.
5.Escape Sequence
5.1.1 escape sequence \”hai\”
6.Type Conversion
6.1int to string
8.tempalte literal in js
`` its called back tick
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)
15.Funtions return
16.Function Passing
17.function Expression
//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.
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
In this has function same as for the .contains in set in java if present meams
return true or else return false
31.map()
.get function used to access the value with the helpof the key value