Continuous Test Orchestration And Execution Platform Online

Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.

How to run JavaScript code in a browser?

To run JavaScript code in a browser, you can create an HTML file with a <script> tag that references a JavaScript file or add the JavaScript code directly within the <script> tag in the HTML file. After that, open the HTML file in your browser.

The browser will then run the JavaScript code and render the output in the browser window.

For example, consider the following JavaScript code.

console.log("Hey, LambdaTesters!");

We can now include the above code within a <script> tag inside an HTML file.

<!DOCTYPE html>
    console.log("Hey, LambdaTesters!");

You can open the above HTML file in your browser window to see the results.


Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.

Start Free Testing

Earn resume-worthy Selenium certifications that help you land a top job.

Learn More

Test your web or mobile apps

Test orchestration and execution cloud of 3000+ browsers and OS


24/7 support


Enterprise grade security


Fastest test execution cloud