import{_ as s}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as a,a as t,o as h}from"./app-D3AKSfRn.js";const n={};function e(l,i){return h(),a("div",null,[...i[0]||(i[0]=[t(`
function greeter(name)
{
console.log("Hello, " + name);
}
调用函数greeter('Alice');
funcGreeter = (name) => {
console.log("Hello, " + name);
}
如果只有一个参数的函数,可以省掉括号
name => {
console.log("Hello, " + name);
}
如果函数体只包含一个返回语句,可以省略大括号
(a, b) => {
return a+b;
}
//可以写成
(a, b) => a+b;
`,10)])])}const r=s(n,[["render",e]]),g=JSON.parse(`{"path":"/note/language/javascript/function.html","title":"JavaScript函数","lang":"zh-CN","frontmatter":{"description":"JavaScript函数 基本函数定义 调用函数greeter('Alice'); 箭头方式定义函数 如果只有一个参数的函数,可以省掉括号 如果函数体只包含一个返回语句,可以省略大括号","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"JavaScript函数\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-02-22T14:42:02.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"JinChao\\",\\"url\\":\\"https://thecodeway.com\\"}]}"],["meta",{"property":"og:url","content":"https://thejinchao.github.io/note/language/javascript/function.html"}],["meta",{"property":"og:site_name","content":"我的博客和笔记"}],["meta",{"property":"og:title","content":"JavaScript函数"}],["meta",{"property":"og:description","content":"JavaScript函数 基本函数定义 调用函数greeter('Alice'); 箭头方式定义函数 如果只有一个参数的函数,可以省掉括号 如果函数体只包含一个返回语句,可以省略大括号"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-02-22T14:42:02.000Z"}],["meta",{"property":"article:modified_time","content":"2025-02-22T14:42:02.000Z"}]]},"git":{"createdTime":1740235322000,"updatedTime":1740235322000,"contributors":[{"name":"thejinchao","username":"thejinchao","email":"thejinchao@gmail.com","commits":1,"url":"https://github.com/thejinchao"}]},"readingTime":{"minutes":0.35,"words":106},"filePathRelative":"note/language/javascript/function.md","autoDesc":true}`);export{r as comp,g as data};