const user = {
login: this.state.name,
pass: this.state.name2,
};
fetch('http://77.232.133.173:4567/hello2', {
method: 'POST',
body: JSON.stringify(user)
}).then(res => {
console.log(res);
console.log(res.text());
})
state = {
arrResult: []
};
searchMovie = async () => {
const searchQuery = document.getElementById("movieName").value;
const movieCall = await fetch(`https://api.themoviedb.org/3/search/movie?api_key=${API_KEY}&language=ru-RU&query=${searchQuery}&include_adult=true`);
data = await movieCall.json();
this.state.arrResult = [];
for (let i = 0; i < data.results.length; i++) {
this.setState({
arrResult: [...this.state.arrResult, data.results[i].title]
});
}
};
[
"results": [
{
"title": "Неуловимые мстители",
"genre_ids": [
28,
12,
10751
]
},
]
static void Factorial1(int number, ref string fact)
{
int factorial = 1;
for (int i = 1; i <= number; i++)
{
factorial *= i;
if (i == number)
{
Console.Write("{0}", i);
}
else
{
Console.Write("{0} * ", i);
}
}
Console.Write(fact, factorial);
Console.ReadKey();
}
static void Main(string[] args)
{
Console.Write("Введите число: ");
int number = int.Parse(Console.ReadLine());
string fact = " = {0}";
Factorial1(number, ref fact);
}
}