Given a string s
, find the length of the longest substring without repeating characters.
Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.
// Step 1: Deep copy a jagged array with numbers or other arrays in a new array | |
const originalArray = [2, 4, 10, [12, 4, [100, 99], 4], [3, 2, 99], 0]; | |
const deepCopyArray = (array) => { | |
}; | |
console.log("## deepCopyArray"); | |
console.log(deepCopyArray(originalArray)); | |
// Step 2: Render jagged array in document body using semantic HTML |
// Step 1: Create a function that will return the number of words in a text | |
const countWords = (text) => { | |
} | |
console.log(countWords("")); // 0 | |
console.log(countWords(" ")); // 0 | |
console.log(countWords("JavaScript !!! ")); // 1 | |
console.log(countWords(" JavaScript")); // 1 | |
console.log(countWords(" JavaScript is cool ")); // 3 |
// Step 1: Create a function that will return the number of words in a text | |
const countWords = (text) => { | |
} | |
console.log(countWords("")); | |
console.log(countWords(" ")); | |
console.log(countWords("JavaScript!!! ")); | |
console.log(countWords(" JavaScript")); | |
console.log(countWords(" JavaScript is cool ")); |