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

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -

angular - DownloadURL return null in below code -