diff --git a/the-string-dot-length-property.js b/the-string-dot-length-property.js index bfd2591..afeecd7 100644 --- a/the-string-dot-length-property.js +++ b/the-string-dot-length-property.js @@ -1,30 +1,18 @@ -/* -Objective: -Practice using the .length property by calculating the length of -multiple predefined strings and assigning the results to specific variables. - -Instructions: -You will be provided with several predefined string variables. -Your task is to: - - Use the .length property to calculate the length of each string. - - Assign the length of each string to its corresponding length variable. - - Ensure that each length variable contains the correct value. - -*/ - -// Starter Code (Pre-filled): -// Predefined strings +// Your code here let stringOne = "Coding Bootcamp"; let stringTwo = "JavaScript"; let stringThree = ""; // Your task: Assign the length of each string to the corresponding variable -let lengthOne; // Length of stringOne -let lengthTwo; // Length of stringTwo -let lengthThree; // Length of stringThree - -// Your code here +let lengthOne = stringOne.length; // Length of stringOne +let lengthTwo = stringTwo.length; // Length of stringTwo +let lengthThree = stringThree.length; // Length of stringThree + +// Optional: Print the lengths to verify +console.log("Length of stringOne:", lengthOne); +console.log("Length of stringTwo:", lengthTwo); +console.log("Length of stringThree:", lengthThree);