Advertisement
Guest User

Untitled

a guest
May 25th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. let message= function(heartSay){
  2. [73 , 32, 108, 111, 118, 101, 32, 121, 111, 117].forEach(function(value){
  3. heartSay+=String.fromCharCode(value)
  4. });
  5. return heartSay;
  6. }
  7. message('')
  8. //"I love you"
  9.  
  10. /* Another Ways of calling the above function by using ECMAScript 6 arrows */
  11. let message= heartSay =>{
  12. [73 , 32, 108, 111, 118, 101, 32, 121, 111, 117].forEach((value)=> heartSay+=String.fromCharCode(value));
  13. return heartSay;
  14. }
  15. message('')
  16. //"I love you"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement