Question:What will be the output for the following JavaScript code:
var total=function(item,tax){return item+=tax}
document.write("Your bill is $"+total(14.95,06))
A $20.95
B Syntax Error
C No output
D 14.9506
/39
+ Answer
A
+ ExplanationThis syntax follows function literal.
It is observed that there is no function name except function keyword before parenthesis. In this syntax variable name will be the function name where function is set.