Вы попали на английскую версию сайта. Большая часть курсов доступна на русском языке


val colier 26 June 2017 →

From quiz:

'Who' to blame?'

Is it correct string literal?

Julia Ayubova 11 June 2017 →

Tell me please, why this solution doesn't work?

const isPrime = (num) => {
  for (let i = 2; i <= num && num%i !== 0; i++) {
     if (i === num) {
    return true;
  return false;

export default isPrime;


 FAIL  __tests__/solution.test.js
  ● prime


    Expected value to be truthy, instead received

      at Object.<anonymous>.test (__tests__/solution.test.js:14:65)

anna cole 03 June 2017 →

Hi! Thank you for such awesome lessons! This task is very tough, however. Even after looking at the teacher's solution I didn't understand the last part, namely, why we need 'end' in it?

return begin + sequenceSum(begin + 1, end);

I don't see how it's used in the function: we don't use it for addition. Could you please explain? Thank you!

Инна Панченко 23 May 2017 →

Help me, please. I don;t understand my mistake. The Output said so amasing thing: ` FAIL tests/solution.test.js ● solution


Expected value to be (using ===):
  "Hello, World!"
  ", !"

  at Object.<anonymous>.test (__tests__/solution.test.js:4:79)

✕ solution (6ms)

Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total`

My code is:

```import * as strings from './strings';

// BEGIN (write your solution here) const solution = (str) => { let result = ''; for (let i = 0; i < strings.length(str); i += 1) { if (strings.toUpperCase(str[i]) === str[i]) { result = result + str[i]; } }

return String(result); }; export default solution; // END

What's wrong with letters?
As for me, the cause lies in the

if (strings.toUpperCase(str[i]) === str[i]) { result = result + str[i]; }

Alvi A 07 March 2017 →

Hello! I can't understand why my solution doesn't work. Can you please explain what does this OUTPUT mean?

make: Entering directory '/usr/src/app'
suppressor pass 'RESULT=pass babel-node test.js'
suppressor fail 'RESULT=fail1 babel-node test.js'
suppressor fail 'RESULT=fail2 babel-node test.js'
suppressor fail 'RESULT=fail3 babel-node test.js'
suppressor fail 'RESULT=fail4 babel-node test.js'
 Expected tests to fail, but they passed. See output above. 
Makefile:2: recipe for target 'test' failed
make: Leaving directory '/usr/src/app'
make: *** [test] Error 1

Run failed! Check and fix errors above!

ozmeks 27 February 2017 →

Hey! In the lesson notes you skipped symbol "+" after variable "name" in the phrase: console.log("His name is " + name " and his age is " + age);

vladpurga 17 February 2017 →

Select the incorrect statements: (Select all correct answers)


Николай Артамонов 16 February 2017 →

What with code-style in teacher's solution? I think it's not very good/

Николай Артамонов 13 February 2017 →

In description export it as default - doesn't work for me, only with export const ... test passed