Method in JavaScript, first test