added pseudocode to javascript
added pseudocode