JavaScript AJAX Basics (retiring) Programming AJAX Parsing JSON Data

Marcell Ciszek
Marcell Ciszek
7,255 Points

double quotes in AJAX

Is it only double quotes that is available when using AJAX?

1 Answer

Ross King
Ross King
18,530 Points

Hi Marcell Ciszek ,

You can use single or double quotes when using AJAX.

An example you can run in the console right now that uses double and single quotes will show you it works either way.

// Create XML HTTP Request Object
var xhr = new XMLHttpRequest();

// Open the request with single or double quotes used."GET", '', false);

// Send the request

// Log the request