₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,080 members, 8,420,202 topics. Date: Thursday, 04 June 2026 at 01:26 PM

Toggle theme

Help With Javascript - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingHelp With Javascript (1003 Views)

1 Reply (Go Down)

Help With Javascript by lahp(op): 1:51pm On Sep 21, 2016
pls can someone pls help me to explain the string methods in javascript cos its kind of hard to understand...though i am enjoying my tutorials on w3schools and so far i understand what has been taught but on getting to the string method i kind of feel lost
Re: Help With Javascript by Karleb(m): 4:59pm On Sep 21, 2016
Bro, download Javascipt the definite guide on Google, you can't become a good Is coder with w3school.

That said. String method are data types that are not number, Boolean, integer, function, array...

I.e
Var str = 'i dont know string';

The variable 'str' here is a variable assigned to the string in the right side of the operand =.

In short, strings are words or setence, you garrit?
Re: Help With Javascript by tr3y(m): 6:20pm On Sep 21, 2016
String method are part of the String primitive data structure, its kind of like a conjoined twins a'int no separating them

once you declare a string like var name = 'John'
name has automatically inherited all the methods that string has like split, toUpper slice etc

w3school barely scratch the surface though, codecademy is much better.
Re: Help With Javascript by lahp(op): 7:17pm On Sep 21, 2016
Karleb:
Bro, download Javascipt the definite guide on Google, you can't become a good Is coder with w3school.
That said. String method are data types that are not number, Boolean, integer, function, array...
I.e
Var str = 'i dont know string';
The variable 'str' here is a variable assigned to the string in the right side of the operand =.
In short, strings are words or setence, you garrit?
is it a book or what
Re: Help With Javascript by lahp(op): 7:18pm On Sep 21, 2016
tr3y:
String method are part of the String primitive data structure, its kind of like a conjoined twins a'int no separating them

once you declare a string like var name = 'John'
name has automatically inherited all the methods that string has like split, toUpper slice etc

w3school barely scratch the surface though, codecademy is much better.
can u explain the indexof slice and lastindexof
Re: Help With Javascript by tr3y(m): 8:06pm On Sep 21, 2016
lahp:
can u explain the indexof slice and lastindexof
string.indexOf(pin)
indexOf goes through the string and looks for the index of pin if its there it returns the index else it returns -1

lastIndexOf is the same as indexOf except it begin from the end of the string

string.slice(x,y) this method slice/cut/divide the string starting from index x and ending at index y

Open your console and play around with the language.
1 Reply

My Semester GPA Calculator With JavascriptHow Do I Create Responsive Slider With JavascriptPlease Help A Script Kiddie Out With Javascript234

App Developer In Warri,asaba,onitsha,agbor NeededHelp Needed With Python Struct ModuleWhat Does Nairaland show On Its Home Page? Latest Posts Or Popular?