Please note that, video materials are only available in Tamil (தமிழ்), code solutions with explanations are available in English.
Rules to be followed:
- Solve programmatically.
- If a solution can be solved in other methods, give it a try. Remember, there is always several ways to do things.
- Try to solve it yourself, if you got struck, no problem. Google it Yourself. At last resort, see the solution of us.
- Code with fun, Happy Hacking.
-
Create an
Array object
- (In Atleast 3 methods) - [🎬 Video] [Solution] -
Take the below
array
and copy it using theslice
method and thefor loop
method. - [🎬 Video] [Solution]var array = [1, 2, 3, 4, 5];
-
Empty this array: - [🎬 Video] [Solution]
var array = [1, 2, 3, 4, 5];
-
How can you check if something is an
Array
? - [🎬 Video] [Solution] -
Find the
index
position ofd
in this array - [🎬 Video] [Solution]var arr = ["a", "b", "c", "d"];
-
What will be returned if you look for the
index
of something that does not exist? - [🎬 Video] [Solution] -
Write a function to check if
milk
exists in yourarray
. - [🎬 Video] [Solution]var items = ["milk", "bread", "sugar"];
-
Now you've found
milk
exists add some code to find theindex
ofmilk
and remove that item. - [🎬 Video] [Solution] -
Write some code to put these numbers in order (Ascending & Descending) - [🎬 Video] [Solution]
var numbers = [1, 12, 2, 23, 77, 7, 33, 5, 99, 234];
-
Write some code to place this list in alphabetical order - [🎬 Video] [Solution]
var p = ["a", "z", "e", "y"];
-
What is the length of these
arrays
- [🎬 Video] [Solution]var arr1 = [, , ,]; var arr2 = new Array(3); var arr3 = [1, 2, 3, 4, 5]; var array = [ [1, 2, 3], [4, 5, 6], ];
-
What are the results of these
splice
andslice
methods - [🎬 Video] [Solution]var a = ["zero", "one", "two", "three"]; var names = ["jason", "john", "peter", "karen"]; var sliced = a.slice(1, 3); var spliced = names.splice(1, 3);
-
What are the
console logs
of theseshift
andunshift
methods - [🎬 Video] [Solution]var a = []; // We take an empty array and a.unshift(1); a.unshift(22); var b = console.log(a); a.shift(); var c = console.log(a); a.unshift(3, [4, 5]); var d = console.log(a); a.shift(); var e = console.log(a); a.shift(); var f = console.log(a); a.shift(); var g = console.log(a);
-
Using
reduce
add all these numbers - [🎬 Video] [Solution]var numbers = [1, 2, 3, 4, 5, 6];
-
Flatten this array to one single array using
reduce
- [🎬 Video] [Solution]var array = [ [0, 1], [2, 3], [4, 5], ];
-
Filter this
array
to return just the dogs - [🎬 Video] [Solution]var animals = [ { name: "Jason", species: "rabbit" }, { name: "Jessica", species: "dog" }, { name: "Jacky", species: "owl" }, { name: "Luke", species: "fish" }, { name: "Junior", species: "rat" }, { name: "Thomas", species: "cat" }, ];
-
Using
array
in Question 19 usemap
function to return all the species. - [🎬 Video] [Solution]