Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript without HTML in Eclipse

I just want to play a little bit with JS. I would like to use JS without HTML or a HTML page -- just a console for output. Whats the best way? I have this:

<html>
<body>
<h1>Playin around</h1>
<script type="text/javascript" src="script.js"></script>
</body>
</html>

script.js:

var test = "global";

function out() {
    var test = "local";
    return test;
}

window.alert(out());

How can I replace window.alert so I can get a console output & how to make a "main" or something, that I don't have to start on the HTML?

Thank you

like image 400
Golem Avatar asked Oct 23 '11 15:10

Golem


1 Answers

I use JS Bin and JS Fiddle.

like image 154
Riz Avatar answered Sep 27 '22 21:09

Riz