Driver Code
var num1 = 1 , den1 = 500 , num2 = 2 , den2 = 1500 , den3 , num3 ; var [ den3 , num3 ] = addFraction ( num1 , den1 , num2 , den2 , num3 , den3 ) ; document . write ( num1 + " " + den1 + " " + num2 + " " + den2 + " " + num3 + " " + den3 + " " ) ;