does webstorm have some shortcut for console.log or console.info

前端 未结 9 1954
野的像风
野的像风 2021-02-01 11:45

Just tired of typing console.log again and again, and do not find a way like \'Sysout + Control + Space\' in Eclipse will create System.out.println().

9条回答
  •  既然无缘
    2021-02-01 12:14

    Yes it does,

    .log and press Tab key. This will result in console.log();

    ie,

    .log + Tab => console.log();


    eg1: variable

    let my_var = 'Hello, World!';
    my_var.log + Tab => console.log(my_var);
    

    eg2: string

    'hello'.log + Tab => console.log('hello');
    

    eg3: string and variable

    'hello', my_var.log + Tab => console.log('hello', my_var);
    

提交回复
热议问题