(I) Method 1: Define it in advance directly in the script tag, only applicable to this HTML file! let add = function(a,b){ return a + b; }; console.log(add(20,300)); const { ['log']:C } = console; C(add(20,300)); (ii) Method 2: Press the tab key to quickly generate console.log, and the cursor is inside (). Press the tab key again and the cursor will automatically jump to the next line! { // Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected. // Example: // "Print to console": { // "prefix": "log", // "body": [ // "console.log('$1');", // "$2" // ], // "description": "Log output to console" // } } 2. The following interval codes are used to release Example. The meanings of some parameters are as follows: { // Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected. // Example: "Print to console": { "prefix": "cl", "body": [ "console.log('$1');", "$2" ], "description": "Log output to console" } } This is the end of this article about two quick ways to write console.log in vscode. For more relevant vscode console.log writing content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: The use of FrameLayout in six layouts
>>: DOCTYPE element detailed explanation complete version
Table of contents Linux 1. Basic use of crontab 2...
1 Introduction Thread technology was proposed as ...
Preface PIPE, translated as pipeline. Angular pip...
background When performing a SQL query, I tried t...
Configure service startup and shutdown in Linux s...
Table of contents Basic concepts of components Th...
Docker-compose deploys gitlab 1. Install Docker I...
First, attach the code below the effect diagram &...
By default, the table title is horizontally cente...
Table of contents Preface: 1. Reasons for the eve...
Set Anchor Point <a name="top"><...
Scenario simulation: Some domestic companies need...
Edit /etc/docker/daemon.json and add the followin...
Today is another very practical case. Just hearin...
Table of contents 1. Images 1. What is a mirror? ...