Blog 34
Which statement correctly uses the newline character to show the numbers 1 and 2 on separate lines?
alert(1 \n2)
alert(1\n2)
alert(1+\n+2)
alert('1\n2')
Thursday, January 16, 2014
Sunday, January 12, 2014
Blog 33
Blog 33
If the code
name = prompt ('What is your name?')
is used, which code checks to see the user did not click cancel?
if (name == null)
if (name == ' ')
if (name != null)
if (name != ' ' )
If the code
name = prompt ('What is your name?')
is used, which code checks to see the user did not click cancel?
if (name == null)
if (name == ' ')
if (name != null)
if (name != ' ' )
Monday, January 6, 2014
Blog 31
Blog 31
Study the code editor an work out the values of the variables after the code runs. Enter the values for a and b.
var a = 5;
whle (a<3) {
a= a +1;
}
var b = 10;
whle (b< = 5) {
b = b +1;
}
a=
b =
Study the code editor an work out the values of the variables after the code runs. Enter the values for a and b.
var a = 5;
whle (a<3) {
a= a +1;
}
var b = 10;
whle (b< = 5) {
b = b +1;
}
a=
b =
Blog 32
Blog 32
Code is written to move a robot. Describe what this code does.
var n = 0
while (n<6)
{robot.forward();
n= n+1;
}
Code is written to move a robot. Describe what this code does.
var n = 0
while (n<6)
{robot.forward();
n= n+1;
}
Blog 30
Blog 30
Study the code and work out the values of teh variables after it runs. Enter values for a and b.
var a = -100;
while (a<- 5) {
a = a + 2;
}
var b = 20;
while (b> - 5) {
b = b +10;
{
a =
b =
Study the code and work out the values of teh variables after it runs. Enter values for a and b.
var a = -100;
while (a<- 5) {
a = a + 2;
}
var b = 20;
while (b> - 5) {
b = b +10;
{
a =
b =
Subscribe to:
Comments (Atom)