Khoi Posted on Jun 16, 2023 Learning about string in JS #javascript #beginners #string #webdev 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: Top comments (0) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)