DEV Community

Khoi
Khoi

Posted on

Learning about string in JS

What does string in JavaScript mean?

  • A string is a sequence of one or more characters that may consist of letters, numbers, or symbols

Example:

let text = "Hello:)))";
Enter fullscreen mode Exit fullscreen mode
  • In the above code, myString is a variable that holds the value of the string "Hello, World!"
  • And to show the code to the screen, you will have to code like this:
 <p id="demo"></p>
    <script>
    let text = "Hello:)))";
    document.getElementById("demo").innerHTML = text;
    </script>
Enter fullscreen mode Exit fullscreen mode
  • your result will be like this: Image description

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay