JavaScript - 23/10/2017 19:57 EDT

Cancelled Posted 6 years ago Paid on delivery
Cancelled

1) How would you iterate over a collection of objects in Javascript using a “for” clause { ‘A’:100, ‘X’:200, ‘Pete’:null, ‘George’:500 }.

2) Write a utility function that takes a string of text and a callback function. It would create a <td> element with the text as it’s body, execute the callback passing the td element (for example to have the callback do some style operations) and then return the modified td element.

function test(txt, callback) {

var td = null; // <- make a td element

// execute the callback, passing it the td element

return td;

}

3) How could you modify the function to return null if the callback returned a Boolean false. Note… no return should be interpreted as true.

JavaScript

Project ID: #15469752

About the project

4 proposals Remote project Active 6 years ago

4 freelancers are bidding on average $29/hour for this job

markskayffsl

A proposal has not yet been provided

$15 USD / hour
(18 Reviews)
5.1
technoweb7

A proposal has not yet been provided

$81 USD / hour
(2 Reviews)
3.5
pavka007

:-) Hi Hiring Manager(-: U just caught my eyes. REASONS why I made the bid. 1 :-) I am javascript worrier, any projects will be defeated by ME. 2 :-) I love CLIENTs from I have 5-year experience of web&frontend More

$12 USD / hour
(2 Reviews)
2.6