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:)))";
- 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>
- your result will be like this:
Top comments (0)