All Tracks/top learn data types and conditionals/
Đang tải...
Hướng dẫn thử thách
1 / 12

Learn Data Types and Conditionals Lesson A

Depending on what kind of work you're doing, you might end up working more with pieces of text rather than numbers. A **string** is a piece of text… and is a fundamental building block of the language. HTML provides structure and meaning to text, CSS allows us to precisely style it, and JavaScript offers many features for manipulating strings. These include creating custom welcome messages and prompts, showing the right text labels when needed, sorting terms into the desired order, and much more. Strings are a fundamental data type in JavaScript. They are used to represent text and are wrapped in either single, double quotes or backticks: ```javascript let greeting = "Hello World!"; let greeting2 = 'I am learning JavaScript!'; let greeting3 = `with The Odin Project!`; ``` Strings declared using single quotes and strings declared using double quotes are the same, and which you use is down to personal preference — although it is good practice to choose one style and use it consistently in your code.
Nhiệm vụ của bạn
There are many ways to manipulate strings in JavaScript. Go through points 8 through 12 of our <a href="https://www.freecodecamp.org/news/javascript-string-handbook/" target="_blank">JavaScript String Handbook</a>
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.html
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵
Test Output
Thử thách này không có bài test tự động. Hãy quan sát kết quả trực tiếp ở khung Preview.