samples/for_each.js

changeset 962
ac62e33a99b0
parent 0
b1a7da25b547
     1.1 --- a/samples/for_each.js	Tue Aug 19 20:43:03 2014 +0100
     1.2 +++ b/samples/for_each.js	Wed Aug 20 10:25:28 2014 +0200
     1.3 @@ -1,21 +1,21 @@
     1.4  /*
     1.5   * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
     1.6 - * 
     1.7 + *
     1.8   * Redistribution and use in source and binary forms, with or without
     1.9   * modification, are permitted provided that the following conditions
    1.10   * are met:
    1.11 - * 
    1.12 + *
    1.13   *   - Redistributions of source code must retain the above copyright
    1.14   *     notice, this list of conditions and the following disclaimer.
    1.15 - * 
    1.16 + *
    1.17   *   - Redistributions in binary form must reproduce the above copyright
    1.18   *     notice, this list of conditions and the following disclaimer in the
    1.19   *     documentation and/or other materials provided with the distribution.
    1.20 - * 
    1.21 + *
    1.22   *   - Neither the name of Oracle nor the names of its
    1.23   *     contributors may be used to endorse or promote products derived
    1.24   *     from this software without specific prior written permission.
    1.25 - * 
    1.26 + *
    1.27   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
    1.28   * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    1.29   * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    1.30 @@ -42,7 +42,7 @@
    1.31  var arr = new JArray(10);
    1.32  
    1.33  // store squares as values
    1.34 -for (i in arr) 
    1.35 +for (i in arr)
    1.36      arr[i] = i*i;
    1.37  
    1.38  // for .. each on java arrays
    1.39 @@ -57,7 +57,7 @@
    1.40  print("System properties");
    1.41  for each (p in System.properties.entrySet()) {
    1.42      print(p.key, "=", p.value);
    1.43 -} 
    1.44 +}
    1.45  
    1.46  // print process environment vars as name = value pairs
    1.47  print("Process environment");

mercurial