Does JavaScript Automatically Convert Types?

JavaScript is built to be innovative and smart. Some other languages aren’t built to auto-convert types to other types, so an expression can be easily evaluated. In JavaScript, it can automatically change numbers to strings and words to numbers as long as it’s in the appropriate setting. Take for example: JavaScript can automatically convert null … Read more

How to Compare Strings Using the Greater Than and Less Than Comparison Operators in JavaScript (Easy!)

Okay, so far we’ve only compared numbers, but what about the letters of the alphabet? Comparing strings in a word is very similar to how you would compare letters in the alphabet, but with a few differences. How are letters of the alphabet prioritized in JavaScript when compared? Uppercase letters are always less than lowercase … Read more

How to Escape Backtick-Quoted Strings in JavaScript (Example!)

So we all know that there are 3 ways to present a string. Single-quotes Double-quotes Backticks The truth is that single and double-quotes are identical. You can use them interchangeably. However, backticks allow you the added option to escape the string. Backticks-quoted strings are also known as template literals. Unfortunately, in order to make JavaScript … Read more

How to Concatenate Strings in JavaScript (EASY Example!)

In JavaScript, you can’t divide, multiply, or subtract strings. But you can add two different strings together. This is also more appropriately called concatenation which basically glues two ends of the string together. How concatenation works on a string Example 1: Combining strings by concatenation You can see that the (+) sign is right in … Read more

How to Use Backslash to Escape Quotation Marks in JavaScript: Preventing it From Becoming a String

Sometimes you’re going to want to do something in between quotes but you don’t want it to turn into a string with all the rest. What you want to do is use the backslash (\) along with a special character designated in JavaScript to perform a certain task. This is what’s called escaping the character. … Read more

How to Make a String in JavaScript: Using Backticks, Double-Quotes, and Single Quotes

Strings represent text and they are usually enclosed within quotation marks. Here are some examples below: This is a string made using a pair of backticks (`…`) This is a string made using a pair of double-quotes. Finally, this is a string made using single quotes. One thing to note is that it’s important to … Read more

What Are Values in JavaScript? (6 Basic Types!)

What are values in JavaScript? Javascript has a concept called values. There are actually 6 fundamental value types: Numbers Strings Booleans Functions Objects Undefined You can invoke or call a JavaScript Value If you want to create a value, you simply have to invoke or call it. Of course, these values have to be stored … Read more