You are on page 1of 4

Self-evaluation checklist for Advanced Javascript

By the end of the ajs module, you should be able to do all of the following tasks on your own,
without using the internet or referring to previous solutions or any other help.

In fact you should not wait until the end of the module. As and when the relevant lectures are
over, you should check which of these tasks you are able to do with that knowledge.

About the tasks


1. These are some of the most commonly asked questions in the interviews
2. Some of these are coding questions and some are theoretical questions

How to solve the tasks


1. Do not use internet
2. Do not use previous code written by you or anyone else
3. Do not take help of any other person
4. You should be able to do these on your own
5. If you are not able to solve a task, try to recall
a. Was it discussed in any lecture?
i. If yes, watch the recording.
ii. Watch the recording in one go. Close the video and then solve the task
without referring to the video.
iii. Do not copy it blindly
b. Was it similar to one of the assignments?
i. If yes, look at the solution
ii. Close the solution and then solve the task
iii. Do not copy it blindly

Task 1: Prototyping
1. Create an object with only properties.
2. Create a function object with properties and methods
3. Add more properties to both of the above mentioned objects using prototypes.
4. Create a new Instance of the above objects.
5. Call the new properties added by prototyping.
Task 2: Able to use prototypes and prototypal inheritance
1. Create an object person with some properties or methods like canTalk, canFly
2. Create another object coder with some properties or methods like canCode and
canCook.
3. Inherit the properties and methods of the person object to the coder object using
prototypes.

Task 3: Identify different types of nodes in a DOM model and


retrieve them.
1. Take a HTML document with different elements and comments and text.
2. Get the nodes present in the document.
3. Identify the relationships between each and every node.

Task 4: DOM Manipulation (adding functionality to HTML


elements)
1. Create a rectangular container.
2. Create three buttons below the container named as changeColor, addChild and remove
Child (buttons).
3. Give css to the container like width, height, and background color etc.
4. Retrieve the container and the button objects and give functionality to the buttons.
5. When clicked on changeColor button, the color of the container should be changed.
6. When clicked on addChild button, a new square box should be added inside the parent
container (rectangular box which is created earlier).
7. The parent container should have flex property.
8. When clicked on the removeChild button, the last added square box child should be
removed/disappeared.

Task 5: Fetch data with an API


1. This task is for fetching movies data by searching in a search bar.
2. Create a search bar and a search button to search any movie by its title.
3. Use this api http://www.omdbapi.com/?apikey=[yourkey]&, generate your api key by signing
up.
4. Call the above api with the title parameter when searched.
5. Use promises and get data from the api and present it in a div below the search bar.
6. Div should contain movie poster, movie title, year of release, IMDB rating, cast and
crew.
7. API to get poster images of movies http://img.omdbapi.com/?apikey=[yourkey]&.

Task 6: Using Higher order functions and setTimeouts


1. Create a search bar to search countries by its name.
2. By typing at least a single letter, all the countries starting with the same letter/letters
should appear in a dropdown.
3. When clicked on any of the suggested country, the text below the search bar should be
shown as “{country} is my country”.
4. Use Higher order functions like filter or map to filter the country names by starting letters.
5. Suggestions should be shown after 1 second gap after change something in the search
bar. Use a setTimeout for this.

Here is the list of countries you can use.


["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua &
Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain",
"Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bo
snia & Herzegovina","Botswana","Brazil","British Virgin Islands","Brunei","Bulgaria","Burkina
Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central
Arfrican Republic","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa
Rica","Cote D Ivoire","Croatia","Cuba","Curacao","Cyprus","Czech
Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El
Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands","Faroe
Islands","Fiji","Finland","France","French Polynesia","French West
Indies","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Gre
nada","Guam","Guatemala","Guernsey","Guinea","Guinea
Bissau","Guyana","Haiti","Honduras","Hong
Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of
Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosov
o","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","L
ithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","M
ali","Malta","Marshall
Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Monten
egro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauro","Nepal","Netherland
s","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","North
Korea","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New
Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto
Rico","Qatar","Reunion","Romania","Russia","Rwanda","Saint Pierre & Miquelon","Samoa","San
Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra
Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South
Korea","South Sudan","Spain","Sri Lanka","St Kitts & Nevis","St Lucia","St
Vincent","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","
Tanzania","Thailand","Timor L'Este","Togo","Tonga","Trinidad &
Tobago","Tunisia","Turkey","Turkmenistan","Turks &
Caicos","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States
of America","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Virgin
Islands (US)","Yemen","Zambia","Zimbabwe"];

Commonly asked interview questions


a. What is a prototype?
b. Is javascript an object oriented language?
c. What is prototypal inheritance?
d. What are closures?
e. What is DOM?
f. Why can’t we develop websites just by using HTML, CSS and JS? (by
dom manipulation).
g. What are promises and why do we use them?
h. What are higher order functions?
i. What is a callback function?
j. What is the difference between __proto__ and prototype?
k. What is an event loop? And its function.
l. What do you mean by asynchronous javascript?
m. What is the scope of a variable?
n. How are variables stored in javascript?
o. How does a bit of code run in javascript?
p. Is javascript an interpreted language or compiled language?

You might also like