Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

839 B

title
title
Catch Misspelled Variable and Function Names

Catch Misspelled Variable and Function Names


Hints

Hint 1

Check the spelling of the first two variables against when it is used. Also, reading a text backwards can help with detecting spelling errors. Make sure to check for these common spelling mistakes in English:

  • vowel confusion (a instead of e, i instead of a)
  • i before e
  • ous vs os
  • double letters if certain one-syllable words adding a suffix (like "big" to "bigger")

Solutions

Solution 1 (Click to Show/Hide)
// 'i' and 'e' swapped in "receivables" and missing 's' in "payables"

let receivables = 10;
let payables = 8;
let netWorkingCapital = receivables - payables;
console.log(`Net working capital is: ${netWorkingCapital}`);