ReSharper Web Help

ReSharper | Templates Explorer | Live Templates | JavaScript

JavaScript

ReSharper provides several live templates for JavaScript, which are described below.

Template name Description
fun

Go to top

Purpose
Adds a function.

function($parameters$){
  $END$
}

Before expansion

After expansion

Parameters

  • parameters - function parameters.

itar

Go to top

Purpose
Creates a for loop.

for (var $INDEX$ = 0; $INDEX$ < $ARRAY$.length; $INDEX$++) {
    var $VAR$ = $ARRAY$[$INDEX$];
    $END$
}

Before expansion

After expansion

Parameters

  • INDEX - name of index variable.
  • ARRAY - array to iterate over.
  • VAR - name of variable to hold the current array element.

See Also

Reference