Codecademy and Eclipse Incompatible?

Status
Not open for further replies.

450

Fully [H]
Joined
Feb 19, 2007
Messages
20,977
So I've been trying out Codecademy in my spare time and I'm quite confused as to why the accepted output in Codecademy refuses to work in Eclipse.

Code:
var legalDrivingAge = 18;
var canIDrive = function (myAge) {
	if (myAge >= legalDrivingAge) {
		return true;
	} else {
		return false;}
};

canIDrive(prompt("Age?"));/CODE]

Also, Eclipse doesn't accept console.log, function, and prompt but Codecademy uses them. Why doesn't it work in Eclipse? When I was making a new class in Eclipse it gave me a warning that use of the default package is discouraged, however that is the only package I have available. What should I be using?

FWIW I'm on OS X 10.8.2.

EDIT: Nevermind it was just a situation of Java vs Javascript.
 
Last edited:
Status
Not open for further replies.
Back
Top