Is there any way to send a variable to another function? like for this example:
function test2(){
$('body').append(lol);
}
function test1(){
var lol = "test";
test2();
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can either prepare an argument for
test2():Or declare
loloutside of the functions so it’s available to both..