![]() Заглавная страница Избранные статьи Случайная статья Познавательные статьи Новые добавления Обратная связь FAQ Написать работу КАТЕГОРИИ: ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ТОП 10 на сайте Приготовление дезинфицирующих растворов различной концентрацииТехника нижней прямой подачи мяча. Франко-прусская война (причины и последствия) Организация работы процедурного кабинета Смысловое и механическое запоминание, их место и роль в усвоении знаний Коммуникативные барьеры и пути их преодоления Обработка изделий медицинского назначения многократного применения Образцы текста публицистического стиля Четыре типа изменения баланса Задачи с ответами для Всероссийской олимпиады по праву ![]() Мы поможем в написании ваших работ! ЗНАЕТЕ ЛИ ВЫ?
Влияние общества на человека
Приготовление дезинфицирующих растворов различной концентрации Практические работы по географии для 6 класса Организация работы процедурного кабинета Изменения в неживой природе осенью Уборка процедурного кабинета Сольфеджио. Все правила по сольфеджио Балочные системы. Определение реакций опор и моментов защемления |
Простое общение с пользователемСодержание книги
Поиск на нашем сайте
About typof operand является выражением, представляющим объект или примитив, тип которого должен быть возвращен Описание В следующей таблице приведены возможные возвращаемые значения typeof. Дополнительная информация о типах и примитивах находится на странице структуры данных JavaScript.
Примеры // Числаtypeof 37 === 'number';typeof 3.14 === 'number';typeof(42) === 'number';typeof Math.LN2 === 'number';typeof Infinity === 'number';typeof NaN === 'number'; // несмотря на то, что это "Not-A-Number" (не число)typeof Number(1) === 'number'; // никогда не используйте эту запись! // Строкиtypeof '' === 'string';typeof 'bla' === 'string';typeof '1' === 'string'; // обратите внимание, что число внутри строки всё равно имеет тип строкиtypeof (typeof 1) === 'string'; // typeof всегда вернёт в этом случае строкуtypeof String('abc') === 'string'; // никогда не используйте эту запись! // Booleanstypeof true === 'boolean';typeof false === 'boolean';typeof Boolean(true) === 'boolean'; // никогда не используйте эту запись! // Символыtypeof Symbol() === 'symbol'typeof Symbol('foo') === 'symbol'typeof Symbol.iterator === 'symbol' // Undefinedtypeof undefined === 'undefined';typeof declaredButUndefinedVariable === 'undefined';typeof undeclaredVariable === 'undefined'; // Объектыtypeof {a: 1} === 'object'; // используйте Array.isArray или Object.prototype.toString.call// чтобы различить обычные объекты и массивыtypeof [1, 2, 4] === 'object'; typeof new Date() === 'object'; // То что ниже приводит к ошибкам и проблемам. Не используйте!typeof new Boolean(true) === 'object';typeof new Number(1) === 'object';typeof new String('abc') === 'object'; // Функцииtypeof function() {} === 'function';typeof class C {} === 'function';typeof Math.sin === 'function'; Интерполяция (ES6) Прямо внутри строки можем вставлять значения переменной До ES6 Problems begin when Дабы избежать этого был придуман приём – интерполяция Особенность – в косых кавычках ` ` - бектики
Можно использовать так
Операторы в JS
https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#Table
Практическое задание My cod const numberOfFilms = +prompt("How many do you whatched films?", ""); a = prompt("What was the last movie you watched?", ""); b = prompt("Your appraisal", "");
const personalMovieDB = { count: numberOfFilms, movies: { a: a, b: b }, actors: {}, genres: [], privat: false };
console.log(personalMovieDB.count); console.log(personalMovieDB.movies);
teacher cod
При использовании кирилицы использовать синтаксис Git Для инициализации git init – подключаем git on project git config –local/global user.name "Abu" If you have never used git before- global git config –global/ local user.email "my_email@whatever.com" У файлов три статуса git status (use "git add <file>..." to include in what will be committed) index.html script.js • Файлы просто созданы, за ними не следят git add –A следим за всеми файлами; git add failName.css - выборочно or git add *.css – все файлы css Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: index.html new file: script.js • Git следить за файлами и можно создать уже commit
git commit –a –m ” что сделано на этой контрольной точке” git log вытаскиваю инфу о всех commit • Создание commita Заливаем на репозиторий Git Hub …or create a new repository on the command line echo "# JS_Beginners" >> README.mdgit initgit add README.mdgit commit -m "first commit"git remote add origin https://github.com/AbuFarm/JS_Beginners.gitgit push -u origin master…or push an existing repository from the command line
Добавление название репозитория git remote add origin https://github.com/AbuFarm/JS_Beginners.git - связаваем локальный репозиторий с Git Рги веткаgit push -u origin master – backup репозитория с локального на удалённый все пуши будут пушиться …or import code from another repository You can initialize this repository with code from a Subversion, Mercurial, or TFS project. -q, --quiet suppress summary after successful commit -v, --verbose show diff in commit message template
Commit message options -F, --file <file> read message from file --author <author> override author for commit --date <date> override date for commit -m, --message <message> commit message -c, --reedit-message <commit> reuse and edit message from specified commit -C, --reuse-message <commit> reuse message from specified commit --fixup <commit> use autosquash formatted message to fixup specified commit --squash <commit> use autosquash formatted message to squash specified commit --reset-author the commit is authored by me now (used with -C/-c/--amend) -s, --signoff add Signed-off-by: -t, --template <file> use specified template file -e, --edit force edit of commit --cleanup <mode> how to strip spaces and #comments from message --status include status in commit message template -S, --gpg-sign[=<key-id>] GPG sign commit
Commit contents options -a, --all commit all changed files -i, --include add specified files to index for commit --interactive interactively add files -p, --patch interactively add changes -o, --only commit only specified files -n, --no-verify bypass pre-commit and commit-msg hooks --dry-run show what would be committed --short show status concisely --branch show branch information --ahead-behind compute full ahead/behind values --porcelain machine-readable output --long show status in long format (default) -z, --null terminate entries with NUL --amend amend previous commit --no-post-rewrite bypass post-rewrite hook -u, --untracked-files[=<mode>] show untracked files, optional modes: all, normal, no. (Default: all) --pathspec-from-file <file> read pathspec from file --pathspec-file-nul with --pathspec-from-file, pathspec elements are separated with NUL character
Условие в JS
Тернарный оператор
Участвует три выражение Бинарный: 4 + 4 Унарный: + ‘4’
Switch – строгое сравненик === Шаблон работы swicth
|
||||||||||||||||||||||||||
Последнее изменение этой страницы: 2021-07-18; просмотров: 186; Нарушение авторского права страницы; Мы поможем в написании вашей работы! infopedia.su Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав. Обратная связь - 216.73.216.27 (0.01 с.) |