Interview Questions and Answers Q1. What is Array.Map function ? What will be output of following ?
const myArray = [1, 4, 9, 16];
const result = myArray.map(x => x * 2); Javascript
Ans. It will create an array with each value as x*2
[2, 8, 18, 32] Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 2 Companies Related Questions Difference between == and .equals() ? Why is String immutable in Java ? Explain the scenerios to choose between String , StringBuilder and StringBuffer ?
or
What is the difference between String , StringBuilder and StringBuffer ? What are the difference between composition and inheritance in Java? Explain OOPs
or
Explain OOPs Principles
or
Explain OOPs Concepts
or
Explain OOPs features
or
Tell me something about OOPs What is a Lambda Expression ? What's its use ? Why Char array is preferred over String for storing password? What are different ways to create String Object? Explain. Does garbage collection guarantee that a program will not run out of memory? What is the difference between final, finally and finalize() ?