Add office photos
Engaged Employer

Lucent Innovation

4.1
based on 40 Reviews
Filter interviews by

Mukesh Machinery Store And Jindal Pipe Store Interview Questions and Answers

Updated 26 Mar 2025

Q1. What are the types of variables in JavaScript?

Ans.

JavaScript has three main types of variables: var, let, and const, each with different scopes and mutability.

  • var: Function-scoped or globally-scoped. Example: var x = 10;

  • let: Block-scoped and can be updated. Example: let y = 20;

  • const: Block-scoped and cannot be reassigned. Example: const z = 30;

Add your answer

Q2. What are closures in JavaScript?

Ans.

Closures are functions that retain access to their lexical scope, even when executed outside that scope.

  • A closure is created when a function is defined inside another function.

  • Closures can access variables from their parent function's scope.

  • They help in data encapsulation and maintaining state.

  • Example: function outer() { let count = 0; return function inner() { count++; return count; }; }

  • Closures are commonly used in callbacks and event handlers.

Add your answer

Q3. What is hoisting in JS

Ans.

Hoisting is a JavaScript mechanism where variable and function declarations are moved to the top of their containing scope.

  • Variable and function declarations are hoisted to the top of their scope during the compilation phase.

  • Only declarations are hoisted, not initializations.

  • Function declarations take precedence over variable declarations.

Add your answer

Q4. what is closures

Ans.

Closures are functions that have access to variables from their outer scope even after the outer function has finished executing.

  • Closures allow functions to access variables from their parent function even after the parent function has returned.

  • They help in maintaining state in JavaScript.

  • Closures are created whenever a function is defined within another function.

Add your answer
Discover Mukesh Machinery Store And Jindal Pipe Store interview dos and don'ts from real experiences

Q5. what is promises

Ans.

Promises in Node.js are objects representing the eventual completion or failure of an asynchronous operation.

  • Promises are used to handle asynchronous operations in a more readable and manageable way.

  • They can be in one of three states: pending, fulfilled, or rejected.

  • Promises can be chained together using .then() to handle success or failure.

  • They help avoid callback hell and make code more maintainable.

  • Example: const myPromise = new Promise((resolve, reject) => { ... });

Add your answer

Q6. what are callbacks

Ans.

Callbacks are functions passed as arguments to other functions, to be executed later.

  • Callbacks are commonly used in asynchronous programming in Node.js.

  • They allow functions to be executed after another function has finished its execution.

  • Callbacks can be used to handle events, make API calls, or perform other tasks asynchronously.

  • Example: fs.readFile('file.txt', (err, data) => { console.log(data); });

Add your answer

Q7. Convert decimal to binary without using inbuilt functions.

Ans.

Convert decimal to binary without using inbuilt functions

  • Create an empty array to store binary digits

  • Use a while loop to divide the decimal number by 2 and store the remainder in the array

  • Reverse the array to get the binary representation

Add your answer

Q8. Find all possible duplicate elements in array

Ans.

Use a hash map to find duplicate elements in an array of strings.

  • Create an empty hash map to store elements and their frequencies.

  • Iterate through the array and for each element, check if it exists in the hash map. If it does, increment its frequency. If not, add it to the hash map.

  • After iterating through the array, filter out elements with frequency greater than 1 to find duplicates.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Mukesh Machinery Store And Jindal Pipe Store

based on 5 interviews
Interview experience
4.6
Excellent
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

4.0
 • 654 Interview Questions
3.7
 • 305 Interview Questions
3.9
 • 208 Interview Questions
3.6
 • 200 Interview Questions
3.7
 • 142 Interview Questions
3.8
 • 138 Interview Questions
View all
Top Lucent Innovation Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter