W
W
webrapist2016-02-27 02:16:51
JavaScript
webrapist, 2016-02-27 02:16:51

How to run javascript in phpstorm?

Hello.
Downloaded and installed the latest phpstorm 10 . I create an empty project, add a .js file to it. I write anything to the file, for example:

var username = 'Админ';
var password = 'Черный властелин';

var user;
var pass;

user = prompt('Введите логин', '');

if(user == 'Админ') {
    pass = prompt('Введите пароль', '');
}
else if(user == null) {
    alert('Вход отменен!');
}
else if(user != 'Админ') {
    alert('Я вас не знаю');
}
else if(pass == 'Черный властелин') {
    alert('Добро пожаловать');
}
else if(pass != 'Черный Властелин'){
    alert('Неверный пароль');
}

I write in the environment itself - conveniently. Checks syntax for errors. But I don't understand how to run it. Usually I just take, write in phpstorm, open google chrome, f12, console. And I paste this code here, it is executed.
Is it possible to do all this in the IDE? To have less movement. I read on the jebrains website about debugging js - I did not understand anything. Some kind of html file was still needed. Why at all?
In general, who can explain in detail what and how to do it? I installed the chroma extension, but I just couldn’t figure it out.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
asd111, 2016-02-27
@asd111

https://confluence.jetbrains.com/display/PhpStorm/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question