Javascript Developer Interview Questions

1,200 javascript developer interview questions shared by candidates

small bag is 1kg each and Big bag is 5kg each. given 3 numbers (small bgs,big bagsand goal) . assuming starting with big bag at start calculate and output the number of small bags needed to finish the goal. if there are not enough bags then output '-1'
Jun 20, 2018

small bag is 1kg each and Big bag is 5kg each. given 3 numbers (small bgs,big bagsand goal) . assuming starting with big bag at start calculate and output the number of small bags needed to finish the goal. if there are not enough bags then output '-1'

Given an array of integers, write a function that finds the indices of two elements in the array such that their sum is equal to a given target number. If such a pair exists, return the indices as an array. If there are multiple pairs, return the first pair. If no such pair exists, return null.
avatar

Mid JavaScript Developer

Interviewed at Newfold Digital

3.4
Aug 27, 2024

Given an array of integers, write a function that finds the indices of two elements in the array such that their sum is equal to a given target number. If such a pair exists, return the indices as an array. If there are multiple pairs, return the first pair. If no such pair exists, return null.

Viewing 561 - 570 interview questions

Glassdoor has 1,200 interview questions and reports from Javascript developer interviews. Prepare for your interview. Get hired. Love your job.