Skip to main content

Posts

Featured

Javascript interview questions set 3

  For set 2 please refer to the  Javascript interview question set 2. Let's begin with set 3, 5)Different Array methods? a)Array map() Method? .map() It is used when you want to transform elements in an array. The map() method creates a new array with the results of calling a function for every array element. The map() method calls the provided function once for each element in an array, in order. Note: this method does not change the original array. Ex:var numbers = [65, 44, 12, 4]; var newarray = numbers.map(myFunction) function myFunction(num) {   return num * 10; } b)When to use the filter method? .filter()  when you want to select a subset of multiple elements from an array. The filter() method creates an array filled with all array elements that pass a test (provided as a function). Note: filter() does not change the original array. Ex: var ages = [32, 33, 16, 40]; function checkAdult(age) {   return age >= 18; } ages.filter(checkAdult); c)When to use find()? .find() When

Latest Posts

CSS INTERVIEW QUESTIONS SET 2

Coding Interview questions set 6

Node.js: create an excel file with multiple tabs.

Coding Interview Questions set 5

Data structure problem 1:Implement a queue using 2 stacks.

javascript snippets interview questions set 3

javascript snippets interview questions set 2

javascript snippets interview questions set 1

Node.js (v.15) 4 things to know.

Coding Interview Questions set 4

Javascript interview questions set 2

Coding Interview Questions Set 3

Css Interview Questions Set 1

Coding Interview Questions Set 2

Coding Interview Questions Set 1

Node.js: Downloading a xml file from given url and reading its data elements.

2 JavaScript Interview Questions that you must know.