Add office photos
Employer?
Claim Account for FREE

Webito Infotech

5.0
based on 1 Review
Filter interviews by

Grab Greco Interview Questions and Answers

Updated 5 Feb 2024

Q1. How to pause process for particular code response using javascript?

Ans.

You can pause a process in JavaScript using the setTimeout function.

  • Use setTimeout function to delay the execution of a code block.

  • Specify the time in milliseconds for the delay.

  • Example: setTimeout(() => { console.log('Paused for 2 seconds'); }, 2000);

View 1 answer

Q2. What is difference between useMemo and useCallback?

Ans.

useMemo is used to memoize a value, while useCallback is used to memoize a function.

  • useMemo is used to memoize a computed value and recompute only when its dependencies change.

  • useCallback is used to memoize a callback function and re-create it only when its dependencies change.

  • useMemo is useful for optimizing performance by avoiding unnecessary re-computations.

  • useCallback is useful for optimizing performance by avoiding unnecessary re-creations of callback functions.

Add your answer

Q3. Differenece between null and undefined in javascript?

Ans.

Null represents an intentional absence of any value, while undefined represents a variable that has been declared but not assigned a value.

  • Null is explicitly assigned to a variable to indicate that it has no value.

  • Undefined is the default value for variables that have been declared but not initialized.

  • Null is a primitive value, while undefined is a type.

  • Null is used to represent an empty value, while undefined is used to represent an uninitialized value.

  • Example: let x = null;...read more

Add your answer

Q4. Explain lifecycle of function component using useEffect

Ans.

useEffect is a hook in React that allows for side effects in function components.

  • useEffect is used to perform side effects in function components.

  • It runs after every render by default.

  • It can be used to fetch data, subscribe to events, or update the DOM.

  • To mimic componentDidMount, pass an empty array as the second argument.

  • To mimic componentDidUpdate, pass a variable or state that useEffect depends on.

Add your answer
Discover Grab Greco interview dos and don'ts from real experiences

Q5. How to replace $ in jquery

Ans.

Use the .replace() method in JavaScript to replace $ in jQuery

  • Use the .replace() method in JavaScript to replace $ with another character or string

  • Example: var str = 'jQuery is $ great'; str = str.replace('$', 'not'); // Output: 'jQuery is not great'

View 1 answer

Q6. Difference between let,var,const?

Ans.

let is block scoped, var is function scoped, const is a constant variable.

  • let is block scoped, meaning it is only accessible within the block it is declared in.

  • var is function scoped, meaning it is accessible throughout the function it is declared in.

  • const is a constant variable, its value cannot be reassigned once it is initialized.

Add your answer

Q7. Truthy and falsy valueof javascript?

Ans.

Truthy values are values that evaluate to true in a boolean context, while falsy values are values that evaluate to false.

  • Truthy values include non-empty strings, numbers other than 0, true boolean values, and objects.

  • Falsy values include empty strings, the number 0, false boolean values, null, undefined, and NaN.

  • Using double negation (!!value) is a common way to convert a value to its corresponding boolean representation.

Add your answer

Q8. What is react js?

Ans.

React JS is a JavaScript library for building user interfaces.

  • React JS is a declarative, efficient, and flexible JavaScript library for building user interfaces.

  • It allows developers to create reusable UI components.

  • React uses a virtual DOM to improve performance by updating only the necessary parts of the actual DOM.

  • React follows a unidirectional data flow, making it easier to understand and debug.

  • React can be used to build single-page applications, mobile apps, and even desk...read more

Add your answer

Q9. C language 2 pattern of digits

Ans.

The question is asking for two patterns of digits in the C language.

  • Use nested loops to iterate through all possible combinations of digits.

  • Check for the desired patterns within the nested loops.

  • Example: Pattern 1 - 1234, Pattern 2 - 5678

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.7
 • 4.3k Interview Questions
3.8
 • 1.5k Interview Questions
3.8
 • 360 Interview Questions
3.7
 • 330 Interview Questions
3.3
 • 311 Interview Questions
3.4
 • 252 Interview Questions
View all
Top Webito Infotech 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
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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