class test { private names: string[] = []; constructor(names:string) { if (!names) console.error("Please provide a valid name"); if (Array.isArray