mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-19 15:43:49 +02:00
Fix broken syntax files
This commit is contained in:
@@ -14,4 +14,5 @@ function App() {
|
||||
<LazyComponent />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
@@ -1,4 +1,4 @@
|
||||
Raw string literals in Go are enclosed in backticks (`` ` ``) and preserve all formatting exactly as written. This is different from interpreted string literals, which process escape sequences like \n. This distinction is particularly useful when you need to process data exactly as it is written.
|
||||
Raw string literals in Go are enclosed in backticks (\`) and preserve all formatting exactly as written. This is different from interpreted string literals, which process escape sequences like \n. This distinction is particularly useful when you need to process data exactly as it is written.
|
||||
|
||||
Consider a scenario where you need to embed an HTML template directly into your Go code. With raw string literals, you can include the HTML exactly as written without worrying about escaping characters or preserving the formatting. For example:
|
||||
|
||||
@@ -11,7 +11,7 @@ htmlTemplate := `<!DOCTYPE html>
|
||||
<body>
|
||||
<h1>Hello, World!</h1>
|
||||
</body>
|
||||
</html>`
|
||||
</html>` // backtick here ends the raw string literal
|
||||
```
|
||||
|
||||
In this case, the raw string literal enclosed in backticks preserves newlines, tabs, and any other whitespace exactly as you write them.
|
@@ -19,4 +19,5 @@ const styleP = document.getElementById("styleP");
|
||||
styleP.style.color = "red";
|
||||
styleP.style.border = "3px solid black";
|
||||
|
||||
console.log(styleP.style);
|
||||
console.log(styleP.style);
|
||||
```
|
@@ -13,4 +13,5 @@ Immediately invoked function expressions, or IIFEs, run as soon as they're creat
|
||||
console.log(
|
||||
"roadmap.sh helps prepare for JavaScript job interview questions"
|
||||
);
|
||||
})();
|
||||
})();
|
||||
```
|
@@ -24,4 +24,5 @@ export function studyJs(course) {
|
||||
|
||||
import { studyJs } from './app.js';
|
||||
|
||||
console.log(studyJs("roadmap.sh")); // Read the JavaScript guide on, roadmap.sh
|
||||
console.log(studyJs("roadmap.sh")); // Read the JavaScript guide on, roadmap.sh
|
||||
```
|
@@ -30,4 +30,5 @@ console.log(courseNumber ); // code won't run
|
||||
|
||||
}
|
||||
|
||||
strictExample(); // ReferenceError
|
||||
strictExample(); // ReferenceError
|
||||
```
|
Reference in New Issue
Block a user