--- id: 587d7b84367417b2b2512b35 title: Catch Misspelled Variable and Function Names challengeType: 1 forumTopicId: 301186 localeTitle: Поймать имена с ошибкой и имена функций --- ## Description
Методы console.log() и typeof являются двумя основными способами проверки промежуточных значений и типов вывода программы. Теперь пришло время войти в общие формы, которые берут ошибки. Одна проблема на синтаксическом уровне, с которой быстрые моделисты могут сочувствовать, - это скромная орфографическая ошибка. Транспонированные, отсутствует или неправильно заглавной буквы, символы в имени переменной или функции будут иметь браузер ищет объект, который не существует - и жалуюсь в виде справочной ошибки. Имена переменных и функций JavaScript чувствительны к регистру.
## Instructions
Исправьте две ошибки орфографии в коде, так что расчет netWorkingCapital работает.
## Tests
```yml tests: - text: 'Check the spelling of the two variables used in the netWorkingCapital calculation, the console output should show that "Net working capital is: 2".' testString: assert(netWorkingCapital === 2); - text: There should be no instances of mis-spelled variables in the code. testString: assert(!code.match(/recievables/g)); - text: The receivables variable should be declared and used properly in the code. testString: assert(code.match(/receivables/g).length == 2); - text: There should be no instances of mis-spelled variables in the code. testString: assert(!code.match(/payable;/g)); - text: The payables variable should be declared and used properly in the code. testString: assert(code.match(/payables/g).length == 2); ```
## Challenge Seed
```js let receivables = 10; let payables = 8; let netWorkingCapital = recievables - payable; console.log(`Net working capital is: ${netWorkingCapital}`); ```
## Solution
```js let receivables = 10; let payables = 8; let netWorkingCapital = receivables - payables; console.log(`Net working capital is: ${netWorkingCapital}`); ```