Please help.. - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Please help..

OpticknerveOpticknerve Posts: 23Member
Hy Guys well i am very new to Java script please help me with this..

[color=Blue]Question, var sentence="java script is easy and fun!"[/color]


write the script code to write:
1.1 To return the number of characters contained in the sentence
1.2 To extract a substring from the index "3" to index"10"
1.3 To Convert every character in the sentence to UPPER CASE
1.4 To return the single character that is stored at the index"7" of the sentence
1.5 To return the index position of the character "f" in the sentence.

Your assistance will be highly appreciated

Comments

  • watson88watson88 Posts: 1Member
    var sentence="java script is easy and fun!"

    for 1.1
    var len=sentence.length;

    for 1.2
    var substr=sentence.substring(3,10)

    for 1.3
    var upprcase=sentence.toUpperCase()

    for 1.4
    var c=sentence.charAt(7)

    for 1.5
    var d=sentence.indexOf('f')


Sign In or Register to comment.