+{ code: '// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const\n\n// define MY_FAV as a constant and give it the value 7\nconst MY_FAV = 7;\n\n// will print 7\nconsole.log("my favorite number is: " + MY_FAV);\n\n// MY_FAV is still 7\nconsole.log("my favorite number is " + MY_FAV);\n\n// Assigning to A const variable is a syntax error\nconst A = 1;\n\n// const also works on objects\nconst MY_OBJECT = {"key": "value"};\n\n// Overwriting the object fails as above (in Firefox and Chrome but not in Safari)\nMY_OBJECT = {"OTHER_KEY": "value"};',
0 commit comments