someFunction(link) { someOtherFunction('div' + link); }
By calling someFunction(‘Test’), the string ‘divTest’ gets passed to someOtherFunction(). But I want the value of the variable ‘divTest’ to be passed.
How can that be done?
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.
Make your variables members of an object. Then you can use
[]to access the objects members using a string: