Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
Python
JavaScript
Java
C++
myFruits = ['banana','apple','orange'] print(myFruits) #Python
const myFruits = ['banana','apple','orange']; console.log(myFruits); //JavaScript
import java.util.Arrays; public class Main { public static void main(String[] args) { String[] myFruits = {"banana","apple","orange"}; System.out.println(Arrays.toString(myFruits)); } } //Java
#include
#include
using namespace std; int main() { string myFruits[] = {"banana", "apple", "orange"}; for (int i = 0; i < 3; i++) { cout << myFruits[i] + "\n"; } return 0; } //C++
Python result:
JavaScript result:
Java result:
CPP result:
['banana', 'apple', 'orange']
banana,apple,orange
[banana, apple, orange]
banana
apple
orange