CSE 154 Examples

Length of a String

Description :

In Javascript the length of a string can be found using the length property of a string.

Syntax : let length = original_string.length;

Examples :

				
					let firstWord = "tree";
					let length = firstWord.length;
				
					length = ??
			
				
					let firstWord = "apple";
					let length = firstWord.length;
				
					length = ??
			
				
					let firstWord = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
					let length = firstWord.length;
				
					length = ??