Web
Opt
tools
Configuration
Input String
String Method
substr(start, length)
substring(start, end)
Start Index
End Index
Run Visualization
1
Console Output
>
Visual Output
Original String
Method Used:
substr()
Result
ello
Key Differences
substr(start, length) takes a starting position and length
substring(start, end) takes start and end positions