It's funny to read something like
var isString = typeof string === "string" ? true : false;
in a file called "bestPractices.js". I'm totally aware that this example is about the ternary operator and not about boolean logic, but if you want to teach best practices, then your examples should be the best practice in every respect.Testing a boolean expression and assigning "true" or "false" to a variable accordingly is one of my personal indicators about the advance of someones mental programming model ;)
So why not instead:
var textColor = hasSpellingMistakes(text) ? "#F00" : "#000"