How to declare and call user defined functions in jquery
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
AshishRank #8,652 · 218 reputationPosted Apr 13, 2014, 11:29 PM EDT
function greet( person, greeting ) {
var text = greeting + ", " + person;
console.log( text );
};
//Calling Jquery function
var greet = greet( "Rebecca", "Hello" ); // "Hello, Rebecca"