24/08/2023 4:40 pm
Topic starter
Notifications
Clear all
In how many ways the string can be created in JavaScript ?
0
In how many ways the string can be created in JavaScript ?
Answer
Add a comment
Add a comment
1 Answer
0
25/08/2023 5:49 am
-
Using Single or Double Quotes: You can create a string by enclosing characters in either single (
'
) or double ("
) quotes. For example:'Hello'
,"World"
. -
Using Template Literals: Template literals, introduced in ECMAScript 2015 (ES6), allow you to create strings with embedded expressions using backticks (`). For example: `Hello, ${name}!`.
These are the two primary ways to create strings in JavaScript.
Add a comment
Add a comment
Forum Information
- 14 Forums
- 1,838 Topics
- 5,054 Posts
- 0 Online
- 1,079 Members
Our newest member: Tyronenodub
Latest Post: loli
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed