javascript

add javascript implementation