Week -2 Day -2
Boost More JavaScript in your jetpack
About JavaScript Value….
Hallow friends Today I Gonna Discuss About basic Knowledge About Javascript.
JavaScript Value:
Example: Car is Javascript And Car Passenger Are JavaScript value :
Example: console.log(“Welcome to My home “)
console.log is javascript Function and (Welcome to My home )= is Value.
Null: Null represents intentionally Missing Value.
Boolean: when store your value then want to see true and false using the operator.
Number: This contains the Only Number.
Strings: This contains Only String.
Error handling :
try-catch:
error handling one method is try-catch. this method work is if the webpage occurs any sort of problem then or an error happens then this try-catch option handles that error and the website going run smooth.
code of example:
<!DOCTYPE HTML>
<script>
try{
alert(‘Hallo !!! I m mohib’);
//no error there
alert(‘By By I m Going To sleep’);
}
catch (error){
alert(‘catch are ignore : because there is no error);
}
</script>
Comments:
in large code Very useful Are comments .. comments indicate which code are doing which function are executed ..
Primitive Value: Primitive is data-based data. example: string, number, boolean, null, symbol, etc
console.log(2);
console.log(‘Hallow’)
- Client and server caching Balancing ..
client and server communicate maintain through the API ..
when the Client access server API then some data are going store in Computer Memory … this data are called cash Memory ..
This cash going help to client computer access speed increase... Because Client Pc stores some Access-related data in Client computer …