HTML Compiler Online
Javascript Online Compiler
index.html
Change Theme
Compress code
Format code
Download Code
Clear Code
Copy Code!
RunĀ
ctrl+s or click
Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Article - JavaScript endsWith method 1</title> </head> <body> <h2><code>endsWith</code> method: used to check string end.</h2> <p>Press <kbd>F12</kbd> to open the console and see the output of the program.</p> <script> const str1 = "Learning javascript"; console.log(str1.endsWith("javascript")); // true const str2 = "How fast is javascript?"; console.log(str2.endsWith("?")); // true </script> </body> </html>
RunĀ