1const array = [2, 5, 9];
2
3console.log(array);
4
5const index = array.indexOf(5);
6if (index > -1) {
7 array.splice(index, 1);
8}
9
10// array = [2, 9]
11console.log(array);
1let str = "12345.00";
2str = str.substring(0, str.length - 1);
3console.log(str);
1'Hey'
2var you = that;
3'You searched'
4document.getElementById('javascript').innerHTML = 'Javascript';
5var then = 'On...';
6alert('grepper!');
1What is JavaScript used for?
2Adding interactive behavior to web pages. JavaScript allows users to interact with web pages. ...
3Creating web and mobile apps. Developers can use various JavaScript frameworks for developing and building web and mobile apps. ...
4Building web servers and developing server applications. ...
5Game development.
1<script>
2 function f1() {
3 var msg="this is the first program of javascript";
4 document.write("hello "+msg.length);
5 }
6</script>
1JavaScript, often abbreviated as JS, is a programming language that conforms
2to the ECMAScript specification.
3JavaScript is high-level, often just-in-time compiled, and multi-paradigm.
4It has curly-bracket syntax, dynamic typing, prototype-based object-orientation,
5and first-class functions.