Home > Web Front-end > JS Tutorial > body text

Use js to implement data formatting_javascript skills

WBOY
Release: 2016-05-16 16:29:25
Original
1379 people have browsed it

Formatting is to convert any type of data into a string through format operations. For example, below

Copy code The code is as follows:

<script><br> console.log(chopper.format('{0} - {1} - {2}', 12, 24, 25)); // outputs "12 - 24 - 25"<br> </script>

The following is a complete code that can be copied into your own project.

Copy code The code is as follows:

 
 
    
        
    
    
        
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!