Author name: Soumya

String split() method in JavaScript

JavaScript’s split() method splits a string into substrings, which are then saved in a new array. This function will yield a new variety as a result. This approach preserves the original string without changing anything. Syntax: string. split() string. split(separator) string. split(separator, limit) Both the limit and the separator are optional parameters. Separator: The string …

String split() method in JavaScript Read More »

JavaScript print() method

The Print() method in JavaScript opens the print dialog to print the current window or document. This method will support Browsers like Edge, Internet Explorer, Google Chrome, Firefox, Opera, Safari, etc. There are no parameters or return values. Syntax: window.print() Example: <html> <head> <title> Use print() method in JavaScript </title> <script type = “text/ javascript”> …

JavaScript print() method Read More »

Scroll to Top