Skip to main content

Mashoko

Mashoko chii?#

Mashoko zvinhu zvese zvakaiswa mu ma quotes "" sokuti:

  1. "Inini ndinonzi Panashe"
  2. "Ndafara nekukuziva"
"2021" i nhamba here kana mashoko?

"2021" aiswa muma quotes saka mashoko haisi nhamba. 2021 inhamba, "2021" mashoko. Izvi zvakakosha kuziva pauchazoverenga nezve topic ye Maths kumberi uku.

Kutsemura Mashoko#

Kana uine mutsara wakanzi

"Inini ndinonzi Panashe"

Unogona kutsemura mashoko obva wagadzira list uchishandisa tsemuraMashoko() seizvi

Ita

Mu Application ye ShonaScript

  1. nyora kuti:
mustara = "Inini ndinonzi Panashe"listReMashoko = mutsara.tsemuraMashoko()nyora(listReMashoko)
  1. baya bhatani re round riri pazasi pe screen

Kana kuti

Mu VS Code

  1. mu file rakanzi index.shona, nyora kuti:
mustara = "Inini ndinonzi Panashe"listReMashoko = mutsara.tsemuraMashoko()nyora(listReMashoko)
  1. mu terminal nyora kuti node shona.js, wobaya enter
  2. mu terminal zvekare, nyora kuti node index.js, wobaya enter

Ukaita izvi zvakanaka, unofana kuona mu terminal makanzi

["Inini", "ndinonzi", "Panashe"]

Izvi zvakanaka kuziva nekuti zvichazokubatsira kumberi.

Kutsemura Mavara mumashoko#

Unogona kutsemura mavara (letters) ari mumashoko uchishandisa tsemuraMavara()

Ita

Mu Application ye ShonaScript

  1. nyora kuti:
mustara = "Inini ndinonzi Panashe"listReMashoko = mutsara.tsemuraMavara()nyora(listReMavara)
  1. baya bhatani re round riri pazasi pe screen

Kana kuti

Mu VS Code

  1. mu file rakanzi index.shona, nyora kuti:
zita = "Panashe"listReMavara = zita.tsemuraMavara()nyora(listReMavara)
  1. mu terminal nyora kuti node shona.js, wobaya enter
  2. mu terminal zvekare, nyora kuti node index.js, wobaya enter

Ukaita izvi zvakanaka, unofana kuona mu terminal makanzi:

["P","a","n","a","s","h","e"]