How to declare variables with the keyword function in es6
This article mainly introduces how to use the keyword function to declare variables in es6, which has a certain reference value, and interested friends can refer to it. I hope you can learn a lot after reading this article.
Declare variables with the keyword function
Function add (a) {var sum = a + 1; return sum;}
A new variable named add is declared and assigned a function definition
The content between {} is assigned to add
The code inside the function is not executed, but is stored in variables for future use
Thank you for reading this article carefully. I hope the article "how to declare variables with the keyword function in es6" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!