HomeSearch

JavaScript Pages

Dot Net Perls has example pages for many languages, with explanations and code side by side (for easy understanding).
C#F#GoJavaJSPythonRubyScalaSwiftVB.NETWindowsWPF
Object. Use objects to provide lookups from keys to values. Objects have properties.JavaScript Object, Dictionary Examples
Arguments. Use the arguments object in a function. Test the performance of arguments usage.JavaScript arguments (Function)
Array. Create new arrays and add elements with methods like push. Get the length to count elements.JavaScript Array Examples
CharAt. Get characters from a string with the charAt method and the string indexer. Use charCodeAt.JavaScript charAt: Get Char From String
EncodeURI. Call the encodeURI and encodeURIComponent methods to format strings for the URL bar.JavaScript encodeURI Examples
For. Loop over a range of numbers, or elements in an array, with for-loops and while-loops.JavaScript for Loop (for in, for of)
Function lookup table. Create an object with function values. Perform lookups on the table to reduce branches.JavaScript function Lookup Table
Function. Design functions with arguments and return values. Use immediately-invoked functions.JavaScript function Examples
IndexOf. Call the indexOf function to find the location of a substring in a string. LastIndexOf searches in reverse.JavaScript indexOf and lastIndexOf
Int32Array. Create and update an efficient integer array with the ArrayBuffer and Int32Array types.JavaScript Int32Array Examples
JSON. Convert a JSON string to an array of objects with JSON.parse. Also use JSON.stringify.JavaScript JSON.parse, stringify Examples
Keywords. Review language keywords and DOM methods that are used to create web applications.JavaScript Keywords
Multiple return values. Return multiple values from a function with an array and an object in a single statement.JavaScript Multiple Return Values
ParseInt. Convert strings to ints with the parseInt function. Use Number and parseFloat.JavaScript parseInt Examples
QuerySelector. Use the querySelector function to evaluate a CSS selector and change DOM elements.JavaScript querySelector Examples
Replace. Replace substrings with other substrings with the replace method. Use global replace.JavaScript replace Examples
Sort. Order the elements in a string array with the sort method. The array is modified in-place.JavaScript Sort String Arrays
Split. Separate parts from a string with the split function. Split on characters, strings and patterns.JavaScript split Examples
String. Review string methods and string operators like equality tests. See string syntax.JavaScript String
Substring. Get a new string in a range from a start to end index from an existing string with the substring method.JavaScript Substring Examples
Switch. Select a case in the switch statement. Compare the switch to an if-else block.JavaScript switch Statement
ToLowerCase. Transform the cases of strings with the toLowerCase and toUpperCase functions.JavaScript toLowerCase Examples
Typeof. Invoke the typeof operator to determine the type of an object. See if a value is a string.JavaScript typeof String, Number
© 2007-2019 Sam Allen. Every person is special and unique. Send bug reports to info@dotnetperls.com.
Home
Dot Net Perls