Hi could some one explan what is the use of the function
Defination generator, And how to use the function defination
generator.. Explan with the example..



Hi could some one explan what is the use of the function Defination generator, And how to use the f..

Answer / Pankaj Raj

A function definition generator, also known as a factory function, is a higher-order function that creates other functions. It takes some arguments and returns a new function with the desired functionality based on those inputs.nnFor example, in JavaScript:n```javascriptnfunction createAdder(x) {n return function (y) {n return x + y;n }n}nnconst add5 = createAdder(5);nconsole.log(add5(3)); // Output: 8n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

What is the Difference between copy to action and call to action?

1 Answers  


How will you compare keyword and expert view?

1 Answers  


How many tabs are available in debug viewer pane?

1 Answers  


Where to use Property Let, Property Get, Property Set in UFT

1 Answers  


Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance

1 Answers  


How to measure transaction time through VBScript without using start and end transaction points?

0 Answers  


Local Obj Repository and SOR are editable know, y we have to edit those.. i mean in which situation we need to edit those and how to do..? pls help me..

2 Answers  


Can I use datatable of Action1 in the Action2.

2 Answers   IBM,


in howmany ways you perfrom batchtesting

6 Answers   Lehman Brothers,


1>How to get the browser name by writing the VBScript. 2>How did you used the GetROProperty and GetTOproperty .give real time scenario. 2>Give and real time ex for the bug having "High Severity and low priority"on banking doamin web based application.

2 Answers   Nous,


An object is created, i dont know the methods available for that object, i want to find methods available for that object and use the required method. How i can do this???

4 Answers   HCL,


Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please

1 Answers   IBM,


Categories