feat: add backtics to JS strings

This commit is contained in:
Ibrahim Abdulhameed committed 2025-08-30 18:10:29 +01:00
1 parent 8afb7b16e2
commit adb50fe16a
1 file changed
+9 -3
+9 -3
View File
@@ -60,11 +60,17 @@ console.log(a); // => undefined
### Strings
```javascript
let single = 'Wheres my bandit hat?';
let double = 'Wheres my bandit hat?';
let singleQuotes = 'Wheres my bandit hat?';
let doubleQuotes = 'Wheres my bandit hat?';
// this is used to embed expressions or for creating multi-line strings
let backTicks = `Wheres my bandit hat? ${some_value}`;
// they can also be mixed,
// NOTE: if you need the functionality of the backticks, use it as the surrounding quotes
let mixedQuotes = `hello ${'dear' + name}, "let's have a great day today`;
// => 21
console.log(single.length);
console.log(singleQuotes.length);
```
### Arithmetic Operators