mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-30 12:05:39 -05:00
* feat: first draft of action and cypress spec * feat: test all generated challenges * fix: better identification of block * action: update cypress config * action: upload to dashboard * action: testing js cert challenges * fix: unnecessary after user code for Make a Person * feat: capture console log output for assert test * fix: remove after seed code * fix: change const to let * fix: test * action: disable js certification * action: stop checking out branch in action * action: check out right mobile repo Co-authored-by: sembauke <semboot699@gmail.com>
765 B
765 B
id, title, challengeType, videoUrl, forumTopicId, dashedName
| id | title | challengeType | videoUrl | forumTopicId | dashedName |
|---|---|---|---|---|---|
| 56533eb9ac21ba0edf2244a9 | Initializing Variables with the Assignment Operator | 1 | https://scrimba.com/c/cWJ4Bfb | 301171 | initializing-variables-with-the-assignment-operator |
--description--
It is common to initialize a variable to an initial value in the same line as it is declared.
var myVar = 0;
Creates a new variable called myVar and assigns it an initial value of 0.
--instructions--
Define a variable a with var and initialize it to a value of 9.
--hints--
You should initialize a to a value of 9.
assert(/var\s+a\s*=\s*9(\s*;?\s*)$/.test(code));
--seed--
--seed-contents--
--solutions--
var a = 9;