Download this extension from the Visual Studio Code Marketplace
Request and perform code reviews from inside your IDE. Review any code, even if it's a work-in-progress that hasn't been committed yet, and use jump-to-definition, your favorite keybindings, and other IDE tools.
Try it free
A snippet pack to make you more productive working with JavaScript. Based on Visual Studio extension by Mads Kristensen, which is based on Atom snippets.
This extension ships a bunch of useful code snippets for the JavaScript and TypeScript editors.
Here's the full list of all the snippets:
console.dir(${1});
console.error(${1});
console.info(${1});
console.log(${1});
console.warn(${1});
debugger;
${1:document}.addEventListener('${2:load}', function(e) {
${3:// body}
});
${1:document}.appendChild(${2:elem});
${1:document}.removeChild(${2:elem});
${1:document}.createElement(${2:elem});
${1:document}.createDocumentFragment();
${1:document}.classList.add('${2:class}');
${1:document}.classList.toggle('${2:class}');
${1:document}.classList.remove('${2:class}');
${1:document}.getElementById('${2:id}');
${1:document}.getElementsByClassName('${2:class}');
${1:document}.getElementsByTagName('${2:tag}');
${1:document}.getAttribute('${2:attr}');
${1:document}.setAttribute('${2:attr}', ${3:value});
${1:document}.removeAttribute('${2:attr}');
${1:document}.innerHTML = '${2:elem}';
${1:document}.textContent = '${2:content}';
${1:document}.querySelector('${2:selector}');
${1:document}.querySelectorAll('${2:selector}');
${1:array}.forEach(function(item) {
${2:// body}
});
function ${1:methodName} (${2:arguments}) {
${3:// body}
}
function(${1:arguments}) {
${2:// body}
}
${1:object}.prototype.${2:method} = function(${3:arguments}) {
${4:// body}
}
(function(${1:window}, ${2:document}) {
${3:// body}
})(${1:window}, ${2:document});
${1:method}.call(${2:context}, ${3:arguments})
${1:method}.apply(${2:context}, [${3:arguments}])
${1:functionName}: function(${2:arguments}) {
${3:// body}
}
JSON.parse(${1:obj});
JSON.stringify(${1:obj});
setInterval(function() {
${0:// body}
}, ${1:1000});
setTimeout(function() {
${0:// body}
}, ${1:1000});
'use strict';
alert('${1:msg}');
confirm('${1:msg}');
prompt('${1:msg}');