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