Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Slice Out a Portion of a String</title> </head> <body> <script> let str = "The quick brown fox jumps over the lazy dog."; let subStr = str.slice(4, 15); document.write(subStr); // Prints: quick brown </script> </body> </html>