JavaScript often abbreviated JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS.ver 97% of websites use JavaScript on the client side for web page behavior,often incorporating third-party libraries. All major web browsers have a dedicated JavaScript engine to execute the code on users' devices. JavaScript is a high-level, often just-in-time compiled language that conforms to the ECMAScript standard.It has dynamic typing, prototype-based object-orientation, and first-class functions. It is multi-paradigm, supporting event-driven, functional, and imperative programming styles. It has application programming interfaces (APIs) for working with text, dates, regular expressions, standard data structures, and the Document Object Model (DOM). The ECMAScript standard does not include any input/output (I/O), such as networking, storage, or graphics facilities. In practice, the web browser or other runtime system provides JavaScri...
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <script> function cal() { var r1=document.forms[0]; var a=document.frm.txt.value; var repeat=0; var c; var pos=prompt("Enter Position: "); var ch=a.charAt(parseInt(pos)-1); if(ch!="") alert("character at specified position is: "+ch); else alert("Please Enter value between "+ a.length); } </script> <form name="frm"> Enter the string: <input type="text" name="txt" ><br/> <input type="button" onclick ="cal()" name="b1" value="Submit"> </form> </body> </html>