let email = "Sreten Petrovic [email protected] Ray Vanraamsdonk [email protected] Valentina Atanasiu [email protected] Ligia Badea [email protected] Walter Miron [email protected] Nizar Ali [email protected] 16 Irene Vieira [email protected] Venelina Gacheva [email protected] Bob French [email protected] Engboon Lau [email protected] Joshua Ramirez [email protected] Toni Wallachy [email protected] Angela Ling [email protected] Carolyn Crews [email protected] Richard Polishak [email protected] Christian Labreche [email protected] Terrence Wong [email protected] Jennifer Bach [email protected] Merideth Evans [email protected] Mike Culbert [email protected] Warren Yu [email protected] Jobs Bg [email protected] Csr Sv [email protected] Emma Miller [email protected] Walter Miron Possible full name: Walter Miron Bryan Olynyk [email protected] Reuben Kahn [email protected] Bill Galey [email protected] Sandra Wright [email protected] Ti Privacy Office [email protected] Parveen Kullar [email protected] Omer King Possible full name: Omer King Abuse Tm [email protected] Kirk Mahon [email protected] John Vozza Possible full name: John Vozza Donald Yakubowski [email protected] Benny Choi [email protected] Derrick Hansen [email protected] Daun Spangler [email protected] Andrew Ross [email protected] Bryan Palacios [email protected] Stefan Abadzhiev [email protected] Adeel Jaffri [email protected] Howard Trieu [email protected] Jeff Brown [email protected] Glen Wakeford [email protected] Julien Marcenac [email protected] Csr Bg [email protected] Diana Verweire [email protected] Stephen Rudin [email protected] 17 Feng Wang [email protected] Sean Sweet [email protected] Ivan Karadjov [email protected] Sandra Cardin [email protected] Dpo Eu [email protected] Paul Egger [email protected] Tic Ipadmin [email protected] Paypalreturns Clac [email protected] Marketing Europe [email protected] Elvin Laganga [email protected] Amy Hu [email protected] Rvhhrsupport Centre [email protected] Gary Leong [email protected] Jon Edwards [email protected] Gabriel Hebert Possible full name: Gabriel Hebert Kathleen Villardo [email protected] Philip Heck [email protected] Jennifer Anquetil [email protected] Mike Clark [email protected] Gary Gollop [email protected] Guillermo Valiente [email protected] Collin Nair [email protected] Jen Grant [email protected] Omer King [email protected] Zhen Wei [email protected] Jim Mitchell [email protected] David Predovich [email protected] Jennifer Manginsay [email protected] Tannis Dueck [email protected] Bob Petrovic [email protected] Rita Christie [email protected] Yared Tessema [email protected] Cathy Kamionka [email protected] Philippe Lecerf [email protected] Nancy Hoyem [email protected] Matthew Wilder [email protected] Richard Roy [email protected] Ali Kassam [email protected] Corpcomm Ph [email protected] Ali Kassam Possible full name: Ali Kassam Gregoire Vigroux [email protected] Yann Bidan [email protected] Ryan Price [email protected] Dave Kindree [email protected] 18 Manuel Zarco [email protected] Bing Wong [email protected] Bryan Olynyk Possible full name: Bryan Olynyk Guangyu Nong [email protected] Roy Alexander [email protected] Karen Erickson [email protected] Bryan Palacios Possible full name: Bryan Palacios Alain Brousseau [email protected] Bryce Mitchell [email protected] Grgoire Vigroux [email protected] Rob Thomas [email protected] Paypalreturns My [email protected] Aleksandra Kolarova [email protected] Gabriel Hebert [email protected] Sales Europe [email protected] Jeffrey Puritt [email protected] Gary Gollop Possible full name: Gary Gollop David Kindree Possible full name: David Kindree Justin Wilton [email protected] Alain Couillard [email protected] Jessica Mendiola [email protected] Helmut Hager [email protected] Jennifer Cua [email protected] Brian Forrest [email protected] Desislava Rangelova [email protected] Sebastian Bulanti [email protected] Barbara Heyland [email protected] Hilbert Chan [email protected] Michel Boucher [email protected] Roy Hicks [email protected] Yoon Bob [email protected] Kevin Bottoms [email protected] Carlos Giammattei [email protected] Darryl Korpany [email protected] Raquel Manglicmot [email protected] Jobs Ro [email protected] Rod Dunbar [email protected] Randy Eugenio [email protected] Dpo Ph [email protected] Margeli Aganon [email protected] Les James [email protected] Careers Ph [email protected] Harminder Hayre [email protected] John Vozza [email protected] 19 Antonina Uzunova [email protected] Tic Ipadmin [email protected] Barry Rivelis [email protected] Xavier Marcenac [email protected] David Chow [email protected] Dennis Bocoy [email protected] Mini Riar [email protected] Phoebelyn Carrera [email protected] Keith Taite [email protected] Edzel Pereira [email protected] Najeeb Ahmad [email protected] Laurie Stewart [email protected] Sonia Becker [email protected] Jonil Abenir [email protected] Jobs Europe [email protected] Glenn Bernard [email protected] Martin Viljoen [email protected] Nancy Filoso [email protected] Patrick Marks [email protected] Nonagentrecruitment Ph [email protected] Nie Webster [email protected] Gail Allison [email protected] Reycarlo David [email protected] Jeffrey Gangemi [email protected] Sean Howard [email protected] Romlus Dasilva [email protected] Cynthia Ledlow [email protected] Imtiaz Mohammad [email protected]"

email = email.split(' ')
// console.log(email)
let newemail = email.filter(i=>{
  return i.match(
    /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
  );
})

console.log(newemail) 
by

Javascript Online Compiler

Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's one of the robust, feature-rich online compilers for Javascript language. Getting started with the OneCompiler's Javascript editor is easy and fast. The editor shows sample boilerplate code when you choose language as Javascript and start coding.

About Javascript

Javascript(JS) is a object-oriented programming language which adhere to ECMA Script Standards. Javascript is required to design the behaviour of the web pages.

Key Features

  • Open-source
  • Just-in-time compiled language
  • Embedded along with HTML and makes web pages alive
  • Originally named as LiveScript.
  • Executable in both browser and server which has Javascript engines like V8(chrome), SpiderMonkey(Firefox) etc.

Syntax help

STDIN Example

var readline = require('readline');
var rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
  terminal: false
});

rl.on('line', function(line){
    console.log("Hello, " + line);
});

variable declaration

KeywordDescriptionScope
varVar is used to declare variables(old way of declaring variables)Function or global scope
letlet is also used to declare variables(new way)Global or block Scope
constconst is used to declare const values. Once the value is assigned, it can not be modifiedGlobal or block Scope

Backtick Strings

Interpolation

let greetings = `Hello ${name}`

Multi line Strings

const msg = `
hello
world!
`

Arrays

An array is a collection of items or values.

Syntax:

let arrayName = [value1, value2,..etc];
// or
let arrayName = new Array("value1","value2",..etc);

Example:

let mobiles = ["iPhone", "Samsung", "Pixel"];

// accessing an array
console.log(mobiles[0]);

// changing an array element
mobiles[3] = "Nokia";

Arrow functions

Arrow Functions helps developers to write code in concise way, it’s introduced in ES6.
Arrow functions can be written in multiple ways. Below are couple of ways to use arrow function but it can be written in many other ways as well.

Syntax:

() => expression

Example:

const numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
const squaresOfEvenNumbers = numbers.filter(ele => ele % 2 == 0)
                                    .map(ele => ele ** 2);
console.log(squaresOfEvenNumbers);

De-structuring

Arrays

let [firstName, lastName] = ['Foo', 'Bar']

Objects

let {firstName, lastName} = {
  firstName: 'Foo',
  lastName: 'Bar'
}

rest(...) operator

 const {
    title,
    firstName,
    lastName,
    ...rest
  } = record;

Spread(...) operator

//Object spread
const post = {
  ...options,
  type: "new"
}
//array spread
const users = [
  ...adminUsers,
  ...normalUsers
]

Functions

function greetings({ name = 'Foo' } = {}) { //Defaulting name to Foo
  console.log(`Hello ${name}!`);
}
 
greet() // Hello Foo
greet({ name: 'Bar' }) // Hi Bar

Loops

1. If:

IF is used to execute a block of code based on a condition.

Syntax

if(condition){
    // code
}

2. If-Else:

Else part is used to execute the block of code when the condition fails.

Syntax

if(condition){
    // code
} else {
    // code
}

3. Switch:

Switch is used to replace nested If-Else statements.

Syntax

switch(condition){
    case 'value1' :
        //code
        [break;]
    case 'value2' :
        //code
        [break;]
    .......
    default :
        //code
        [break;]
}

4. For

For loop is used to iterate a set of statements based on a condition.

for(Initialization; Condition; Increment/decrement){  
//code  
} 

5. While

While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.

while (condition) {  
  // code 
}  

6. Do-While

Do-while is also used to iterate a set of statements based on a condition. It is mostly used when you need to execute the statements atleast once.

do {  
  // code 
} while (condition); 

Classes

ES6 introduced classes along with OOPS concepts in JS. Class is similar to a function which you can think like kind of template which will get called when ever you initialize class.

Syntax:

class className {
  constructor() { ... } //Mandatory Class method
  method1() { ... }
  method2() { ... }
  ...
}

Example:

class Mobile {
  constructor(model) {
    this.name = model;
  }
}

mbl = new Mobile("iPhone");