We can use it to store data in local storage.
We’ve to convert objects into strings first to store them.
To store objects we call
The first argument is the key.
And we can get data by their keys with
avaScript comes with various kinds of loops.
One kind of loop is the
We can loop through any kind of iterable object with the
Some iterable objects include arrays, strings, and node lists.
Another kind of loop is the
There’s also the
break keyword lets us end the loop early:
continue keyword lets us skip to the next iteration:
We can create an object with curly braces:
It has properties and methods.
this is the
student object itself.
We can call
And we can assign values to properties with:student.age = 19;
We can create promises with the
resolve to fulfill the promise with the sum.
And we call
reject to reject the promise with an error.
Then we can call
then to get the resolved value and
catch to get the error values: