Interview Question
Developer Program EngineersCountry: India
Interview Type: Written Test
<!DOCTYPE html>
<html>
<body>
<p id="demo">Click the button to display the extracted part.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction()
{
var str = "i love you !";
var res = str.slice(0,2);
document.getElementById("demo").innerHTML=res;
}
</script>
</body>
</html>
collabedit.com/rg7fx
- S O U N D W A V E October 05, 2013