slice() using strings in Javascript

slice() using strings in Javascript


<!DOCTYPE html>
<html>
<head>
<title>Test page</title>
<script type="text/javascript">

/*slice is basically used to slice the string from one position to another
in the given string*/

var str= "THIS IS AN ARTISITIC STYLE OF REPRESENTING THINGS";
var newie = str.slice(10,-1);
console.log(newie);



</script>

</head>
<body>
<h1></h1>
</body>
</html>



Comments

Popular posts from this blog