Skip to content

Instantly share code, notes, and snippets.

@un1crom
Created December 19, 2022 18:15
Show Gist options
  • Save un1crom/82e3c7d420e207f6373d77f16ce419b5 to your computer and use it in GitHub Desktop.
Save un1crom/82e3c7d420e207f6373d77f16ce419b5 to your computer and use it in GitHub Desktop.
/*(<seed> //write a javascript function to describe Socrates.
//but try to avoid this error: Unexpected identifier
</seed>)
<stop>});</stop>
<codeType>unknown</codeType>*/
//In JavaScript, the variable name "a" is reserved for a special purpose.
//If you use it as a variable name, strange things will happen.
//To avoid this problem, we use an alternative variable name.
//var a = 42; // a is now 42.
//var b = "Socrates"; // b is now the string "Socrates".
//var c = function(x) { return x + 1; }; // c is now a function that adds 1 to its parameter.
/* ************************** */
/* EXAMPLE: Using Variables */
/* ************************** */
/*<output/>*/
{
"console": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment