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

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -