Questions d'entretiens - Javascript developer

959

Questions d'entretien pour Javascript Developer partagées par les candidats

Principales questions d'entretien

Trier: Pertinence|Populaires|Date
Dassault Systemes
On a demandé à un Javascript Developer...13 février 2018

4)write program to remove duplicate in an array

4 réponses

function removeDuplicateUsingSet(arr){ let unique_array = Array.from(new Set(arr)) return unique_array } Moins

var chars1 = ['A', 'B', 'A', 'C', 'B']; var uniqueChars2 = []; chars1.forEach((c) => { if(!uniqueChars2.includes(c)) { uniqueChars2.push(c); } }) Moins

for(let i=0; i

Afficher plus de réponses
Nagarro

Convert : person_First_Name to personFirstName

4 réponses

var name = "person_First_Name"; var d = name.split("_").join(""); console.log(d); Moins

'Person_First_Name'.split("_").join("");

function convertor(name){ let result="" splittedNames=name.split("_") splittedNames.map(a=>{ result+=a }) console.log(result); } convertor("Person_First_Name") Moins

Afficher plus de réponses
IOMEDIA

How will you put a child div in center to outer container?

2 réponses

{display:block; margin:0 auto;}

Margin : auto

Dassault Systemes

6) what will be the value of a and b if Var a = 5 +7 + “8” Var b = “8”+5+7

3 réponses

a=128,b=857

a = 128 b= 857

a=128 b=124

Pin Click

Q : About Basic tech knowledge and one good assignment

2 réponses

Good

Please do assignment carefully

Capital One

To reverse a string without using reverse keyword.

2 réponses

Can use the loop in structure

Str.split('').reverse().join('')

Dassault Systemes

2)How to clear an array by different way

2 réponses

A = []; orelse; A .length=0; orelse; loop it till length is 0 and pop all elements Moins

arr.splice(0, arr.length)

GoDaddy

Using a nested for() loop is inefficient, can you do it more efficient than the native String.indexOf() method? Without nesting for loops or recursion.

2 réponses

Convert the strings to objects with each word being added as a property to speed up the lookup. I had heard of this technique but never done it myself. Moins

sort the words will be done in n Log n . for each word in 1st string do binary search on other string which will run in n log n so overall complexity will be n log n. Moins

Snapwiz

Online : 1) Nearest to zero element in an array 2) Longest prefix program 3) single loop reversal of string online questions require you to fill the logic only , not to write the entire program Pen paper : input =['acr', 'bat','car','atb','rca','rac','xyz'] desired output: [ ['acr','car','rca','rac'], ['bat','atb'],['xyz']] i.e grouping of psuedonyms .

1 réponses

let arr = ["acr", "bat", "car", "atb", "rca", "rac", "xyz"]; let flag = 0; let result = []; let pos = 0; for (let i = 0; i < arr.length; i++) { if (!result.flat().includes(arr[i])) { result.push([arr[i]]); pos += 1; for (let j = i + 1; j < arr.length; j++) { if (arr[i].length === arr[j].length) { for (let k = 0; k < arr[i].length; k++) { if (arr[j].includes(arr[i][k])) { flag += 1; } } if (flag == arr[i].length) { result[pos - 1].push(arr[j]); } flag = 0; } } } } console.log(result); Moins

Realtor.com

Pair programming exercise on a React Router related bug.

2 réponses

I tried rooftop slushie mentioned above and it was pretty helpful. I recommend it. Moins

This is an interesting read: bit.ly/faang100

1 - 10 sur 959 questions d'entretien d'embauche

Consultez les questions posées en entretiens pour des emplois similaires

php developerweb developerpython developerrails developerfront end developerui developerhtml5 developer