Print numbers from 1 to 10


/ Published in: SmallTalk
Save to your folder(s)

Note that this uses the `to:do:` method of `Number`


Copy this code and paste it in your HTML
  1. 1 to: 10 do: [ :element | Transcript show: element; cr ].

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.