fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@@ -0,0 +1,15 @@
---
title: Functions
localeTitle: функции
---
## функции
Функции в Swift состоят из параметра и типа возврата. Функции могут быть созданы с использованием этой базовой структуры: \`\` \`Swift func sayHello (nameOfPerson: String) -> String { let hello = "Hello", + nameOfPerson + "." печать (привет) }
sayHello (nameOfPerson: «Стив») ` `` In this example, the function sayHello takes in a string name and prints out the phrase` «Hello, Steve.» \`.
## Параметры функции
Функции не требуют ввода входных параметров или возвращаемых типов. Однако для этого требуются скобки после именования функций. \`\` \`Swift func helloSteve () { print («Привет, Стив»). }
helloSteve () // Это выдает «Привет, Стив». \`\` \`