The replace() method is used to replace a specified value with another value in a string. OUTPUT : Replace “Apple” with “Samsung” in the paragraph below: Try it Please visit Apple!
The substr() method is similar to substring() and slice(), but the difference is that the second parameter in substr() specifies length of the extracted part. OUTPUT : Extracted string by substr():
The substring() method is similar to the slice() method with a difference that it(substring()) can’t accept negative indexes. OUTPUT : extracted string by substring():
slice() method is used to extract a part of string and returns the extracted part in a new one(string). This method takes two parameter – the starting index(position) and the ending index(position). OUTPUT : extracted string:
The DELETE statement is used to delete records in a table. The SQL DELETE Statement The DELETE statement is used to delete rows in a table. SQL DELETE Syntax Notice the WHERE clause in the SQL DELETE statement! The WHERE clause specifies which record or records that should be deleted. If you omit the WHERE clause, all records will be deleted! Demo Database In this...
Maps API Map() Constructor : Example Create a Google Map: Output :
Google Maps – Disable 45° Perspective View – setTilt(0) You can disable 45° perspective view by calling setTilt(0) on the Map object: Example Output : Tip: To enable 45° perspective view at a later point, call setTilt(45).
The following map types are supported in Google Maps API: ROADMAP (normal, default 2D map) SATELLITE (photographic map) HYBRID (photographic map + roads and city names) TERRAIN (map with mountains, rivers, etc.) The map type is specified either within the Map properties object, with the mapTypeId property: Or by calling the map’s setMapTypeId() method: