- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 448 Articles for Programming Scripts
![Priya Pallavi](https://www.tutorialspoint.com/assets/profiles/13562/profile/60_91320-1512544134.jpg)
128 Views
Use the parseFloat() method in JavaScript to return a floating point number after parsing a string.ExampleYou can try to run the following code to learn how to work with parseFloat() method in JavaScript. var val1 = parseFloat("2"); var val2 = parseFloat("30 minutes"); document.write(val1); document.write(""+val2);
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
68 Views
Use the Boolean() method in JavaScript to convert to Boolean. You can try to run the following code to learn how to convert [50, 100] to Boolean in JavaScript.ExampleLive Demo Convert [50,100] to Boolean var myVal = [50,100]; document.write("Boolean: " + Boolean(myVal));
![Nikitha N](https://www.tutorialspoint.com/assets/profiles/13558/profile/60_76068-1512713229.jpg)
117 Views
Use the copyWithin() method in JavaScript to copy array elements. You can set the index from/to where (index) the elements are copied. The following are the elements supported by JavaScript.target − The position of the index from where the elements is to be copied.begin − The index to start copying the element. This is an optional parameter.end − The index to end copying the element. This is an optional parameter.ExampleYou can try to run the following code to learn how to work with copyWithin() method in JavaScript. var num ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
106 Views
The altkey property is used to show whether ALT key is pressed or not when key event was triggered.ExampleYou can try to run the following code to learn how to implement altKey property in JavaScript. Press any key function funcAltKey(event) { var val = document.getElementById("res"); if (event.altKey) { val.innerHTML = "ALT key: Pressed"; } else { val.innerHTML = "ALT key: NOT Pressed"; } }
![Abhinanda Shri](https://www.tutorialspoint.com/assets/profiles/13552/profile/60_73264-1512711555.jpg)
91 Views
The fill() method in JavaScript is used to fill elements with static value in an array. The following are the parameters for fill() −value− The value to be filled.begin− The start index to begin filling the array.end− The ending index to stop filling the array.ExampleYou can try to run the following code to learn how to work with fill() method on JavaScript − var num = ["One", "Two", "Three", "Four", "Five"]; document.write(num); document.write(""+num.fill("Six",2,3));
![Fendadis John](https://www.tutorialspoint.com/assets/profiles/13534/profile/60_64028-1512539837.jpg)
158 Views
To set the shape of the border of the top-right corner in JavaScript, use the borderTopRightRadius property. Set border radius using this property.ExampleYou can try to run the following code to learn how to set the shape of the top-right border with JavaScript.Live Demo #box { border: thick solid gray; width: 300px; height: 200px } Demo Text Change top right border radius function display() { document.getElementById("box").style.borderTopRightRadius = "20px"; }
![Ankitha Reddy](https://www.tutorialspoint.com/assets/profiles/13550/profile/60_73963-1512711511.jpg)
107 Views
The ctrlKey property is used to show whether the CTRL key is pressed or not when key event was triggered. You can try to run the following code to learn how to implement a ctrlKey property in JavaScript − Example Live Demo Press any key function funcCtrlKey(event) { var val = document.getElementById("res"); if (event.ctrlKey) { val.innerHTML = "CTRL key: Pressed"; } else { val.innerHTML = "CTRL key: NOT Pressed"; } }
![Alankritha Ammu](https://www.tutorialspoint.com/assets/profiles/13523/profile/60_83090-1512649277.jpg)
85 Views
The altkey property is used to show whether SHIFT key is pressed or not when key event was triggered.ExampleYou can try to run the following code to learn how to implement shiftKey property in JavaScript. Press any key function funcShiftKey(event) { var val = document.getElementById("res"); if (event.shiftKey) { val.innerHTML = "SHIFT key: Pressed"; } else { val.innerHTML = "SHIFT key: NOT Pressed"; } }