0

How to find the number of characters in the string ?

What is I have to find out the number of characters present in my string "cxbsgsfdhxbdisgdjdngdjaldhrurnrhryegsnsidgdvdndkfyri"? Or Suppose someone has a doubt , "Is there a Null character at the end ?"

8th Oct 2019, 3:22 AM
P Jatin
P Jatin - avatar
2 Answers
+ 6
var abc ="This is a string"; document.write(abc.length);
8th Oct 2019, 3:30 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
0
Aren't null characters rather used in C++? Null characters might not be used in modern programming languages, such as Java, Python and JavaScript, because they are more automaticated. So in JavaScript you might not need to worry about the null characters. I don't know JavaScript good, but it makes sense that JavaScript would not require it.
8th Oct 2019, 4:58 AM
Seb TheS
Seb TheS - avatar