// JS Batch2 Assignment Question3 answer

// Define arrays
let array = [],array1=[];

// Get length of array
let len = prompt("Enter the lenght of array");

// Get the character to be searched
let search_char = prompt('Enter the character to be searched : ');

// Loop through the array to input elements
for(let i=0;i<len;i++){
array[i] = prompt('Enter elements');
// Print array

// Loop through the newly generated array
for(let i=0;i<len;i++){
// Split the every single string from array a and store it to a temperory variable temp
let temp = array[i].split('');

// Check whether given character is present in temperory variable temp
// If given character found in temperory variable just join the splitted string and
// store it to new array array1
array1[i] = temp.join('');
// Print on console