Last active
September 25, 2016 01:05
-
-
Save dumindu/fb31efa70747f322d33f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let a = [1, 2, 3]; // a[0] = 1, a[1] = 2, a[2] = 3 | |
let mut b = [1, 2, 3]; | |
let c: [int; 3] = [1, 2, 3]; //[Type; NO of elements] | |
let d: ["my value"; 3]; //["my value", "my value", "my value"]; | |
let e: [i32; 0] = []; //empty array | |
println!("{:?}", a); //[1, 2, 3] | |
println!("{:#?}", a); | |
// [ | |
// 1, | |
// 2, | |
// 3 | |
// ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment