This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import './App.css' | |
function MyButton(props) { | |
return ( | |
<button style={{ backgroundColor: props.color }}> | |
Нажми меня | |
</button> | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useState} from 'react' | |
import './App.css' | |
const getRandomColor = () => { | |
const letters = '0123456789ABCDEF'; | |
let color = '#'; | |
for (let i = 0; i < 6; i++) { | |
color += letters[Math.floor(Math.random() * 16)]; | |
} | |
return color; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import './App.css' | |
function MyButton() { | |
return <button>Hello</button> | |
} | |
function BorderedButton() { | |
return ( | |
<div className="bordered"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useState} from 'react' | |
import reactLogo from './assets/react.svg' | |
import viteLogo from '/vite.svg' | |
import './App.css' | |
function MyButton() { | |
return <button>Hello</button> | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Task 1 | |
const comparer = function (a, b){ | |
if(a > b) return 1; | |
else if(a < b) return -1; | |
else return 0; | |
} | |
console.log(comparer(1, 2)); | |
// Task 2 factorial |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useState} from 'react' | |
import reactLogo from './assets/react.svg' | |
import viteLogo from '/vite.svg' | |
import './App.css' | |
function MyButton() { | |
return <button>Hello</button> | |
} | |
function App() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
#include <conio.h> | |
using namespace std; | |
void log_in(); | |
void main_menu(); | |
void admin(); | |
void sign_in(); | |
void admin_menu(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="uk"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>JS Завдання</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
padding: 20px; | |
display: flex; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<p>Написать функцию, которая принимает 2 числа и возвращает меньшее из них.</p> | |
<p>Написать функцию, которая принимает от 1 до 5 чисел и возвращает большее из них.</p> | |
<p>Написать функцию, которая возводит переданное число в указанную степень.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.js | |
// на выбор есть 20 заданий, необходимо выполнить любые 5 из них. | |
// очень желательно разобраться со spread, rest, closure, arrow functions, function expressions и по возможности показать это в решениях. | |
// 1. Написать функцию, которая принимает 2 числа и возвращает -1, если первое меньше чем второе, 1 — если первое больше чем второе и 0 — если числа равны. | |
function compareNumbers(a, b) { | |
if (a < b) { | |
return -1; | |
} else if (a > b) { |