Sha256: efacc3c339cd6f74d16dc14dcc0ad1cf7150441ddaa56c5f88bd03e59cb54a62

Contents?: true

Size: 506 Bytes

Versions: 222

Compression:

Stored size: 506 Bytes

Contents

"
" Greet someone or something!
"
" If no argument is given, return 'Hello, World!'.
" If the optional argument is given, greet that name instead.
"
" Hint: If you're confused by the first line in the function,
"       read `:help a:0`.
"
"       It also uses the short if-then-else syntax which is
"       called ternary operator in other languages:
"
"          condition ? true : false
"
function! Hello(...) abort
  let name = (a:0 == 1 ? a:1 : 'World')

  " your implementation goes here

endfunction

Version data entries

222 entries across 222 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.179 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.178 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.177 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.176 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.175 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.174 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.173 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.172 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.171 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.170 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.169 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.167 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.166 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.165 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.164 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.163 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.162 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.161 tracks/vimscript/exercises/hello-world/hello_world.vim
trackler-2.2.1.160 tracks/vimscript/exercises/hello-world/hello_world.vim