Back to lesson Try it Yourself
JavaScript Objects
JavaScript
Result

        
Expected output
maize, beans, rice
40, 25, 12
maize: 40 bags
beans: 25 bags
rice: 12 bags

Keyboard shortcuts

Ctrl + EnterRun the code
Ctrl + SSave in this browser
Ctrl + /Comment / uncomment line
Tab / Shift + TabIndent / outdent
Ctrl + Z / Ctrl + YUndo / redo
Ctrl + FFind (browser search)

Your code is saved automatically in this browser. Share copies a link that opens this exact code. Code runs in a safe sandbox – it can't see your account.

Are you sure?