Hacker News new | ask | show | jobs
by Syrup-tan 3760 days ago
Here's a simple modification to get the random number between 1 and 10

    [:div
     [:p "Hit Run to get a random number:"]
     [:h1 (+ 1 (Math.floor (* 10 (rand))))]]
If you weren't previously familiar with the syntax I figured this might help.
2 comments

I really want to add the ability to save/load content that can be built on. I think it would be awesome to share clever tricks!
You can use (rand-int 10)