When a user inputs text I want to create an array with the name of the inputted text and add it to array logNum. I’ve tried like this but it doesn’t work:
logNum.push(var document.getElementById("buttonInput").value.toString()[]);
Any ideas?
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.
Assuming you’ve yet created your logNum array, you can do this :
The
[something]notation creates a new array whose first element issomething.