Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JavaScript Convert a String to Uppercase Characters</title> </head> <body> <script> var str = "Hello World!"; var result = str.toUpperCase(); document.write(result); // Prints: HELLO WORLD! </script> </body> </html>