Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Leaning Java Script
/* Combining Literal numbers and strings */ var myString = 16 + "Abi"; // The number 16 is converted to a string print(myString); var myName = "Abi Patel"; var stringLength = myName.length; print(stringLength); print(myName[3] + myName [6]); // 4th and 7th characters of name print(myName.slice (-9, -6)); // Your first name var myArtist = "MJ \n\"King\" \nof \nPop"; // Practicing Escape Characters print(myArtist); var myLegalName = "Abi Amit Patel"; var myLegalFirst = myLegalName.substr(0,4); var myLegalMiddle = myLegalName.substr(4,4); var myLegalLast = myLegalName.substr(9,5); print (myLegalLast + ", " + myLegalFirst + "" + myLegalMiddle); var myPhrase = "Live for today Hope for tomorrow"; var first = myPhrase.indexOf("for"); print(first); var second = myPhrase.indexOf("for"); print(second);
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
More testing with JS
nuBuilder - Calc precision
Time Waister
My name is
Set(), union, intersection, difference
sortStack
Just stop thinking about it and go eat
Javascript reverse string, one index
F
FÜU 23.08
stackse - search stackoverflow differently
Please log in to post a comment.