mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
663 B
663 B
Variables
Instructions
You can declare variables in two ways. The type can be implicitly detected using the var
keyword, or explicitly by declaring the variable's type:
var strPatrick = 'Patrick';
String strSpongebob = 'Spongebob';
Declare and initialize the following variables:
obj
of typeObject
, containing any value.planet
of typeString
, containing the name of the planet you live on.year
of typeint
, containing the current year.lucky
of typebool
, containingtrue
orfalse
(you decide).- constant
pi
of typedouble
, containing pi value with 2 decimal places
No main is needed.