# Category: Functional Prgramming

## Top 10 Interview Questions for Front-end, Web, ui, JavaScript Developers

Gauging candidates knowledge of Javascript, HTML, CSS skills in less than an hour is certainly a challenging task. It is almost impossible to calibrate candidates success at the company by asking technical questions. If...

## Implement the bind function in javascript

Implement the Function.prototype.bind function in javascript bind allows you to change the scope of this also allows you to create functions when called are prefixed with arguments as shown in the solutution Solution

## Function which returns a function javascript

Problem Implement the compound function which returns a function and satisfies the following condition function add10 (a) { return a + 10 } console.log(add10(10)) // 20 console.log(compound(add10)(10)) // 30 Solution

## function that returns a function until called without arguments in javascript

Write a function say which logs the following. console.log( say(‘Foo’)(‘bar’)() ) // => “Foo bar ” console.log( say(‘Hi’)(‘my’)(‘name’)(‘is’)(‘Foo’)() ) // “Hi my name is Foo ” Note: Solution does not use recursion. There is...

Solution

## flatten three level deep tree

[et_pb_section admin_label=”section”][et_pb_row admin_label=”row”][et_pb_column type=”4_4″][et_pb_text admin_label=”Text” saved_tabs=”all” background_layout=”light” text_orientation=”left” text_text_color=”#000000″ use_border_color=”off” border_color=”#ffffff” border_style=”solid” global_module=”1167″] In the previous examples, we saw how to filter two level deep trees with map, filter and concatAll. Let’s try three....

## Implement zip in javascript

Reducing an array to a single value When we need to combine two arrays by progressively taking an item from each and combining the pair. If you visualize a zipper, where each side is...

## Implement reduce in javascript

Reducing an array to a single value Often we have to iterate over the array by accessing multiple items at a time. For example, if you have to find the largest element in an...

## Implement concatAll in javascript

Querying Nested Arrays To work with tree data structure we need to flatten them. We will be solving a problem using Array.prototype.forEach(). We will define Array.prototype.concatAll() using Array.prototype.forEach(). We will solve the same problem...

## Lambda operator filter and map chaining

Problem Filter only those videos with a rating of 5.0 and return the id of such videos. Solution Further Reading Functional Programming