constructor - Using methods in functions -


i noticed methods require little more finesse when used in functions, such using "new date()" more common "getyear," when giving value function's parameter.

here's example of code have written, see if has suggestions improve upon. there constructor use these arguments?

layout:

playing (''timeline')

    function guitarplaying(year, month) {         var x= {getyear - 1996};            var y= {getmonth - 3};         return x + "years" + "" + y + "months.";       }     document.getelementbyid('timeline').innerhtml= guitarplaying() 

thank you.


Comments

Popular posts from this blog

angular - DownloadURL return null in below code -

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -