127
rated 0 times
[
129]
[
2]
/ answers: 1 / hits: 21504
/ 10 Years ago, sun, july 27, 2014, 12:00:00
I'm new to Javascript, and I'm trying to write a chrome extension.
For the extension, if users input a string, I want the first two characters to be sliced off.
Currently, I have:
if (text.charAt(0) == '/') {
text.slice(0,2);
chrome.tabs.create({
url: PrivateURL + text
});
}
But it's not working, nothing is being sliced off. I have a feeling something is wrong with my syntax, as I'm still learning. Any help is appreciated.
More From » javascript