Could any one explain how this function alert, when more no of brackets of parameters are passed. I could not able to understand it clearly.
function sum(a) {
alert expects a string. If it doesn't get a string, it will attempt to convert whatever object it receives (and a function is a type of object) into one. If the object has a toString method, then that will be called to perform said conversion.
alert
toString