Java script follow instructions given in the code bellow please help :)


#1

java script
follow the instructions given within the code and so i have and it tells me i am wrong so i have looked at the hint and i still do not quite get it please help

unexpected token ")"

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "Japan"

// Use console.log to print out the length of the variable myCountry.
("Japan".substring console.log(0, 5 ) );

// Use console.log to print out the first three letters of myCountry.
("Japan".substring console.log(0, 5 ) );


#2

You've done the brackets wrong. Do you remember how to;
- log an item to the console?
- get a substring of a string?

I would suggest redoing these lessons, and then coming back to this.

Good luck :slight_smile:


#3

thanks m8 will do now that im home


#4

Good luck, and if you get stuck this time, reply again here and I'll be happy to help :slight_smile:


#5

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "Japan"

// Use console.log to print out the length of the variable myCountry.
console.log myCountry.length(myCountry .substring( 0 , 5 ) )

// Use console.log to print out the first three letters of myCountry.
console.log myCountry.length(myCountry .substring( 0 , 5 ) )

so I have gotten to this jibblyj and it is now saying unexpected identifier


#6

if I cannot reply it means I have reached the max replys but what ill do if thats the case ill like ur comment if im stuck and if you got me through it i will tick it to say that it was the solution to the problem also is there one set way of doing it or is there several different ways of doing it cause it apparently should look like this: "// Declare a variable on line 3 called
// myCountry and give it a string value.

var myCountry = "Australia";

// Use console.log to print out the length of the variable myCountry.
console.log(myCountry.length);

// Use console.log to print out the first three letters of myCountry.
console.log(myCountry.substring(0,3));"


#7

hey m8 passed it and what ill do if i need help in futer is ill message you if you online also thank you soo much for all you help and patience you were a great help today


#8

Sure, I'd be happy to help :slight_smile: (P.S. I'm on every day, so I'll reply within 24 hours)

No problem. I can honestly say that you are one of the nicest users I've seen on here. :wink:


#9

thank you jibblyj most apreciated
<3


#10

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.