Notice: Undefined variable: string in /home/u665484253/domains/wpcodekit.com/public_html/wp-content/themes/twentytwenty-child/functions.php on line 61
Remove value after decimal in javascript?
<!DOCTYPE html>
<html>
<body>
<p>Value:</p>
<script>
var myFloat = 4.5;
var myTrunc = Math.trunc( myFloat );
document.write(myTrunc+ ” “);
</script>
</body>
</html>
Read More Posts
- How to get current user info from wp user database in wordpress?
- How to use ob_start() function in php?
- How to stop and pause youtue video in jquery?
- How to fetch data (messages) in every second with ajax (setinterval) from mysql (PHP) in wordpress?
- How to create custom wishlist in wordpress without plugin?