{"id":478,"date":"2024-10-23T05:22:26","date_gmt":"2024-10-23T04:22:26","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=478"},"modified":"2024-11-19T11:05:57","modified_gmt":"2024-11-19T11:05:57","slug":"mwnci-shift-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-shift-function\/","title":{"rendered":"Mwnci shift() Function"},"content":{"rendered":"<h2><span id=\"Syntax\" class=\"mw-headline\">Syntax<\/span><\/h2>\n<p>shift(<i><b>array<\/b><\/i>,[<i><b>value]<\/b><\/i>)<\/p>\n<h2>Description<\/h2>\n<p>The <em>shift() <\/em>function returns a new array with the first element of <em>array<\/em> removed if no <em>value<\/em> is given, otherwise the first <em>value <\/em>elements are removed.<\/p>\n<h2>Example<\/h2>\n<pre>a=[1,2,3,4,5,6]\r\nprintln(a)\r\na=shift(a)\r\nprintln(a)\r\na=shift(a, 2)\r\nprintln(a)\r\n\r\n[1, 2, 3, 4, 5, 6]\r\n[2, 3, 4, 5, 6]\r\n[4, 5, 6]<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax shift(array,[value]) Description The shift() function returns a new array with the first element of array removed if no value is given, otherwise the first value elements are removed. Example a=[1,2,3,4,5,6] println(a) a=shift(a) println(a) a=shift(a, 2) println(a) [1, 2, 3, 4, 5, 6] [2, 3, 4, 5, 6] [4, 5, 6]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-478","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/478","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=478"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/478\/revisions"}],"predecessor-version":[{"id":697,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/478\/revisions\/697"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}