` ` are the
template Literals which are allows you to combine a one two or more strings, numbers, varaible etc.
If you want to pass html, as well as css template literals is one of the best
thing to use these
to use these.
let x = "Hello"; let result = x + " World!"; console.log(result);
Data type tells the computer that what kind of data you are working with.
There are two main data types in JavaScript: These are premitive or non-premitive
Premitive data types are basic blocks that can store singlw values like numbers,
strings, words etc. Non Premitive can store multiple values and can be mutable.
String, Symbols, Number, Null, Bloean, Biginteger, Object, Undefined
typeof() is like a an
operator which is used to check the data types of variables and constants.
Whenever we want to check the data type of variabla and constant we just use type
of operator like this, console.log(typeof(x)) here x is a random variable or constant.
let z = "Hello"; console.log(typeof(z));
Objects are the containers that are used to store attributes of a one main thing.
Keys and values are used in objects to store and save.
Objects are mutable and their value changed whenever you want.
let obj{ name: "Ali", age: 34, height: 6.6 }
Arrays also like a objects that are used to store multiple values and are mutable, that can be
changed whenever needed.
The difference is that the values stored in array in the form of ordered.
let fruits = ["apple", "banana", "mango", "Lemon"]; console.log(fruits[0]) console.log(fruits[2])
In JavaScript, operators are like symbols or words that perform actions on values
(variables, numbers, strings, etc.)
Arithmetic, Assignment, Comparison, Logical Operators are the types of JS
operators.
let x = "Hello"; let result = x + " World!"; if x>2 if (x<2 || x=0)
Condional statements are the statements that are used to that are executed on the behalf of condition, when a particular condition meets the requirements it will be executed, if the codition does'nt meet the requirements it will not be executed if() or else are used.
let x=9;, let y=10; if(x>y){alert("X is greater")} else{alert("Y is greater")}
Methods arrays also decrease the ccomplexity of javascript and arrays, there are most commonly used methods available which were perform different functions, few of them are as follows:
toString(), at(), join(), pop(), push() shift(), unshift(), length
As like objects and arrays strings also contain some methods, the functions of the string methods also same as arrays and objects, few of them are as follows:
` ` are the
template Literals which are allows you to combine a one two or more strings, numbers, varaible etc.
length,charAt(), charCodeAt(), codePointAt(), concat(), at(), [] slice(), substring(), substr(), toUpperCase(), toLowerCase()