Skip to content

Знакомство с веб технологиями. GeekBrains University | Introduction to web technologies. GeekBrains University

Notifications You must be signed in to change notification settings

novikovadaria/js_introduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Урок 3. Основы JavaScript

Задание

  1. Необходимо создать html-страницу с названием 1.html, в которой подключить файл 1.js (его тоже необходимо создать рядом с html-файлом). В js-файле необходимо создать следующий скрипт: Необходимо пользователя попросить ввести температуру в градусах Цельсия, преобразовать введенное пользователем значение в соответствующую температуру в градусах по Фаренгейту и вывести в alert сообщение с текстом (пример): Цельсий: 21, Фаренгейт: 69.8 Где вместо 21 и 69.8 должны быть подставлены соответствующие значения, которыбыли получены ранее. Формула перевода градусов Цельсия в градусы Фаренгейта: градусы Фаренгейта = (9 / 5) * градусы Цельсия + 32

Примечания: Пользователь всегда вводит корректное число.

  1. Необходимо создать html-страницу с названием 2.html, в которой подключить файл 2.js (его тоже необходимо создать рядом с html-файлом). В js-файле необходимо создать следующий скрипт: Cоздать функцию, которая принимает имя и выводит приветствие, используя переданное имя, в консоль. Также необходимо спросить у пользователя его имя и вызвать функцию, про которую ранее шла речь, передав ей полученное от пользователя имя.

Lesson 3. JavaScript Basics

Task

  1. You need to create an html page with the name 1.html , in which to connect the 1.js file (it also needs to be created next to the html file). In the js file, you need to create the following script: You need to ask the user to enter the temperature in degrees Celsius, convert the value entered by the user to the corresponding temperature in degrees Fahrenheit and output an alert message with the text (example): Celsius: 21, Fahrenheit: 69.8 Where instead of 21 and 69.8, the corresponding values that were obtained earlier should be substituted. The formula for converting degrees Celsius to degrees Fahrenheit: degrees Fahrenheit = (9/5) * degrees Celsius + 32

Notes: The user always enters the correct number.

  1. You need to create an html page with the name 2.html , in which to connect the 2.js file (it also needs to be created next to the html file). In the js file, you need to create the following script: Create a function that accepts a name and outputs a greeting using the passed name to the console. It is also necessary to ask the user for his name and call the function that was previously discussed, passing it the name received from the user.

About

Знакомство с веб технологиями. GeekBrains University | Introduction to web technologies. GeekBrains University

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published