1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Write your Happy New Year JavaScript

Discussion in 'HTML & JavaScript' started by revproxy, Jan 1, 2016.

  1. revproxy

    revproxy BANNED BANNED Jr. VIP Premium Member

    Joined:
    Nov 20, 2015
    Messages:
    396
    Likes Received:
    100
    Gender:
    Male
    HTML:
    function happy_new_year() { run() }
    function run() { 
     var c = arguments.callee.caller.name; 
     var arr = c.split("_"); 
     arr = arr.map(function(s) { 
      return s[0].toUpperCase() + s.substr(1); 
     }); 
     console.log(arr.join(" "));
    }
    happy_new_year();
    
    Write your`s