You can do this in the browser console, or with a tool like jsfiddle, or by saving it to an HTML file and opening that file in your browser.
You do also have a typo in your code - you need to remove some brackets. And if you are going to define bool = false then be aware that when you compare it to 1 and 0 this only works because JS is loosely typed. 1 is coerced to be equivalent to true and 0 is coerced to be equivalent to false.
var num =2;
var bool = false;
if(num ==1 && bool==1) alert("TEST1 bool: "+ bool);
else
if(num ==2 && bool==1) alert("TEST2 bool: "+ bool);
else
if(num ==2 && bool==0) alert("TEST3 bool: "+ bool);
else
if(num ==3 && bool==0) alert("TEST4 bool: "+ bool);
JSFiddle Example
http://jsfiddle.net/mx3eyhxf/
JSFiddle is nice for this kind of thing because you can load in libraries like jQuery really easily.
Browser Console
As @Evegeniy says in his comment above, to do this simply open your web developer tools, switch to console, paste your code and run.
File
Create an HTML file like:
<html>
<head>
<script type="text/javascript">
var num =2;
var bool = false;
if(num ==1 && bool==1) alert("TEST1 bool: "+ bool);
else
if(num ==2 && bool==1) alert("TEST2 bool: "+ bool);
else
if(num ==2 && bool==0) alert("TEST3 bool: "+ bool);
else
if(num ==3 && bool==0) alert("TEST4 bool: "+ bool);
</script>
</head>
<body></body>
</html>
and open that in your browser.
boolis not a reserved word.