Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Javascript help

Name: Anonymous 2013-03-06 16:37

I'm just doing this on codeacademy,  so i don't know if this really would work or if the shitty program is just shitty.
(the // are the instructions for the lesson)

This is what they wanted:
//On line 2, declare a variable myName and give it your name.
var myName = "Ben"
//On line 4, use console.log to print out the myName variable.
console.log(myName)
//On line 7, change the value of myName to be just the first 2
//letters of your name.
myName = "Be"
//On line 9, use console.log to print out the myName variable.
console.log(myName)
 
This is what I thought would work:
//On line 2, declare a variable myName and give it your name.
var myName = "Ben";
//On line 4, use console.log to print out the myName variable.
console.log(myName);
//On line 7, change the value of myName to be just the first 2
//letters of your name.
myName = myName.subscript (0,2);
//On line 9, use console.log to print out the myName variable.
console.log(myName);

Name: Anonymous 2013-03-06 17:25

>>5
He could also try Agora:
http://lambda-the-ultimate.org/node/4219

but in essence it would be the same, because objects and functions are the same: i.e. in a well designed language, like lambda calculus, there is no difference between objects and functions.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List