take array input
arr = list(map(int, input().split()))
take array input
arr = list(map(int, input().split()))
how to take array input from user in javascript
// Here we define a array variable to store user input values:
var arr=[];
/* Then we define a while loop for taking multiple values.
it takes the value and store the values into an array until
the condition is true.But when a user didn't give a value
or just give 'q'value short for quit then it breaks the loop
and logs the array into a console interface of webpage.*/
while(true){
var input=prompt("Enter the Numbers: ");
if(input== null || input== 'q')
{
break;
}
arr.push(Number(input));
}
console.log(arr);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us