Skip to content

Instantly share code, notes, and snippets.

View un1crom's full-sized avatar
💭
CODING A LOT

Russell A Foltz-Smith un1crom

💭
CODING A LOT
View GitHub Profile
/*(<seed> //write a nodejs javascript function to count to a number between 34 and 98 and say Hello World.
</seed>)
<stop>});</stop>
<codeType>javascript</codeType>*/
function count(number) {
for(var i = 0; i <= number; i++) {
console.log(i);
}
}
/*(<seed> ////write a javascript function to say Hello World!..
</seed>)
<stop>});</stop>
<codeType>javascript</codeType>*/
// var x = document.getElementById("demo");
// function myFunction() {
// x.innerHTML = "Hello World!";
// }
/*<output/>*/
/*(<seed> //write a nodejs javascript function to count to a number between 34 and 98 and say Hello World.
</seed>)
<stop>});</stop>
<codeType>javascript</codeType>*/
var count = 0;
for(var i = 34; i <= 98; i++){
console.log(i);
/*(<seed> //write a nodejs javascript function to count to a number between 34 and 98 and say Hello World.
//but try to avoid this error: Unexpected end of input
</seed>)
<stop>});</stop>
<codeType>javascript</codeType>*/
//create a function that takes two parameters, a number and a string, and prints the string that many times.
//write a function called 'repeat' with two parameters: a string and a number. The function should print the string as many times as the number indicates. For example, repeat('hello', 3) should print "hello hello hello".
/*(<seed> //write a javascript function to describe Socrates.
</seed>)
<stop>});</stop>
<codeType>javascript</codeType>*/
//write a javascript function to describe John
//call the function "describe" for both Socrates and John.
/*<output/>*/
{
"console": {}
/*(<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.
/*(<seed> //write a javascript server module to ask Wikipedia API about socrates. do not write any comments.
//but try to avoid this error: Invalid or unexpected token
//but try to avoid this error: Unexpected end of input
</seed>)
<stop>});</stop>
<codeType>unknown</codeType>*/
//but try to avoid this error: Unexpected identifier
/*(<seed> //write a nodejs javascript function to count to a number between 34 and 98 and say Hello World.
//but try to avoid this error: Unexpected identifier
</seed>)
<stop>});</stop>
<codeType>unknown</codeType>*/
//var sayHello = function(num) {
// for (var i=0; i<=num; i++){
// console.log("Hello World!");
/*(<seed> //write a javascript server module to ask Wikipedia API about socrates. do not write any comments.
//but try to avoid this error: Unexpected identifier
</seed>)
<stop>});</stop>
<codeType>unknown</codeType>*/
//and this one: Unexpected token {" at line 1, column 1
/*<output>{
"console": {}
/*(<seed> //write a javascript server module to ask Wikipedia API about socrates.
//but try to avoid this error: Unexpected end of input
//but try to avoid this error: Unexpected end of input
//but try to avoid this error: Unexpected end of input
</seed>)
<stop>});</stop>
<codeType>unknown</codeType>*/