Permalink
Browse files

Modify example to reflect if/else feature

  • Loading branch information...
1 parent fcdb446 commit 8da110d3f9607c55c186ef13e0e1b5fc1fd7722d @txus committed Sep 12, 2011
Showing with 10 additions and 2 deletions.
  1. +1 −0 Gemfile
  2. +9 −2 examples/hello_world.ns
View
1 Gemfile
@@ -2,3 +2,4 @@ source "http://rubygems.org"
# Specify your gem's dependencies in noscript.gemspec
gemspec
+gem 'rake'
View
11 examples/hello_world.ns
@@ -14,8 +14,15 @@ print('Negative johnny is', -johnny)
print(foo())
print(foo(242))
-print(bar())
-print(bar(242))
+if bar() == 111
+ print(bar())
+end
+
+if bar(242) == 728
+ print('wrong!')
+else
+ print('cool!')
+end
print('Johnny is still', johnny)

0 comments on commit 8da110d

Please sign in to comment.