কম্পিউটার

জাভাস্ক্রিপ্টে TypedArray.reverse() ফাংশন


TypedArray অবজেক্টের বিপরীত() ফাংশন একটি টাইপ করা অ্যারের বিষয়বস্তুকে বিপরীত করে।

সিনট্যাক্স

এর সিনট্যাক্স নিম্নরূপ

typedArray.reverse()

উদাহরণ

<html>
<head>
   <title>JavaScript Array every Method</title>
</head>
<body>
   <script type="text/javascript">
      var typedArray = new Int32Array([11, 5, 13, 4, 15, 3, 17, 2, 19, 8 ]);
      document.write("Contents of the typed array: "+typedArray);
      document.write("<br>");
      var result = typedArray.reverse(Math.sqrt);
      document.write("Contents of the reversed array: "+result);
   </script>
</body>
</html>

আউটপুট

Contents of the typed array: 11,5,13,4,15,3,17,2,19,8
Contents of the reversed array: 8,19,2,17,3,15,4,13,5,11

  1. জাভাস্ক্রিপ্ট অ্যারে বিপরীত()

  2. জাভাস্ক্রিপ্ট অ্যারে ফিল() ফাংশন

  3. JavaScript Array.of() ফাংশন

  4. জাভাস্ক্রিপ্টে অ্যারে রিভার্স()