Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
function tokped(i) {
  const text1 = 'Codility'
  const text2 = 'Test'
  const text3 = 'Coders'
  for(let n=1; n< i;n++){
    if(n % 5 && n % 3 && n % 2){
      console.log(text1+text2+text3 + n)
    }else if(n % 5 && n % 3){
      console.log(text2+text3 + n)
    }else if(n%3 && n%2){
      console.log(text1+text2 + n)
    }else if(n%2 && n%5){
      console.log(text1+text3 + n)
    }else if(n % 2){
      console.log(text1 + n)
    }else if(n % 3){
      console.log(text2 + n)
    }else if(n % 5){
      console.log(text3 + n)
    }else {
      console.log(n)
    }
  }
}
tokped(24)
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
MirzaChilmanpro
0viewers