0

What is the use of return key in javascript

1st Oct 2020, 11:02 AM
Multiversal Consciousness
Multiversal Consciousness - avatar
3 ответов
+ 2
Please use only relevant words in tags, and avoid writing your question into the tags ☝
1st Oct 2020, 11:38 AM
Ipang
+ 2
Monu Kumar Used to return something from a Function For eg:- Function hi(name){ return "hello "+name } //This function takes name as a parameter and returns "hello"+ name //using hi(); alert(hi("Arnav")); //Now hi("Arnav") will be replaced with "hello Arnav" and alerts("hello Arnav") That's what a return statement do
31st Oct 2020, 11:16 AM
Arnav Kumar [Less/Not Active]
Arnav Kumar [Less/Not Active] - avatar