I already wrote the code below and it
worked very well, but the system
does not pass me to the next challenge
I even tryed the code in replit and worked
well.
Your code so far
// Setup
const myArray = [["John", 23], ["dog", 3]];
myArray.shift();
// Only change code below this line
myArray.unshift(["paul", 35]);
console.log(myArray);
Your browser information:
User Agent is: Mozilla/5.0 (Linux; Android 5.0.1; Lenovo TAB 2 A7-30HC) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Safari/537.36
awsome, it really did help, what a … mistake, thank you, I will take this chane to as a question , I am trying to make an http post request to the url in the code blow and it didn’t work although i tried a testing url and it hit me back with a responce but it was using JSON instead of XML, CAN any one help me with that PLEASE !!!
<!DOCTYPE html>
<html>
<body>
<h2>The XMLHttpRequest Object</h2>
<button type="button" onclick="loadDoc()">Request data</button>
<p id="demo"></p>
<script>
function loadDoc() {
const xhttp = new XMLHttpRequest();
xhttp.onload = function() {
document.getElementById("demo").innerHTML = this.responseText;
}
const data = '<query key="q1" enable-multiple-hits="true">' +
'<unstructured_citation>Hungate, B. A., & Hampton, H. M. (2012). Ecosystem services: Valuing ecosystems for climate. Nature Climate Change, 2(3), 151-152.
</unstructured_citation>' +
'</query>'
const url='https://doi.crossref.org/servlet/deposit';
xhttp.open("POST", url);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.send(data);
}
</script>
</body>
</html>