javascripting
Advanced tools
Comparing version 1.7.0 to 1.8.0
{ | ||
"name": "javascripting", | ||
"description": "Learn JavaScript by adventuring around in the terminal.", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "url": "git://github.com/sethvincent/javascripting.git" |
@@ -18,1 +18,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,2 +17,6 @@ var path = require('path'); | ||
}); | ||
}; | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -16,2 +16,6 @@ var path = require('path'); | ||
}); | ||
}; | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -5,3 +5,3 @@ --- | ||
Well done completing the excercise. | ||
Well done completing the exercise. | ||
@@ -8,0 +8,0 @@ Run `javascripting` in the console to choose the next challenge. |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -5,17 +5,17 @@ --- | ||
Conditional statements are used to, based in a specified boolean condition, alter the control flow of a program. | ||
Conditional statements are used to alter the control flow of a program, based on a specified boolean condition. | ||
A conditional statement look like this: | ||
A conditional statement looks like this: | ||
```js | ||
if(n > 1) { | ||
if (n > 1) { | ||
console.log('the variable n is greater than 1.'); | ||
} else { | ||
console.log('the variable n is less or equal than 1.'); | ||
console.log('the variable n is less than or equal to 1.'); | ||
} | ||
``` | ||
Inside parenthesis you must enter a logic statement, meaning that should be either true or false. | ||
Inside parentheses you must enter a logic statement, meaning that the result of the statement is either true or false. | ||
The else block is optional and contains the code that will be executed if the statement it's false. | ||
The else block is optional and contains the code that will be executed if the statement is false. | ||
@@ -31,3 +31,3 @@ ## The challenge | ||
Then use `console.log()` to print **The fruit name has more than five characters.** if the length of the value of `fruit` is greater than five. | ||
Print **The fruit name has less or equal than five characters.** otherwise. | ||
Print **The fruit name has five characters or less.** otherwise. | ||
@@ -34,0 +34,0 @@ Check to see if your program is correct by running this command: |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -16,3 +16,3 @@ --- | ||
`touch introduction.js` | ||
`touch introduction.js` or if you're on windows, `type NUL > introduction.js` | ||
@@ -19,0 +19,0 @@ Open the file in your favorite editor, and add this text: |
@@ -18,1 +18,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -6,3 +6,3 @@ --- | ||
Numbers can be integers, like `2`, `14`, or `4353`, or they can be decimals, | ||
also known as floats, like `3.14`, `1.5`, or '100.7893423'. | ||
also known as floats, like `3.14`, `1.5`, or `100.7893423`. | ||
@@ -9,0 +9,0 @@ ## The challenge: |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -21,1 +21,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -17,1 +17,5 @@ var path = require('path'); | ||
}; | ||
exports.run = function (args) { | ||
require(path.resolve(process.cwd(), args[0])); | ||
}; |
@@ -0,7 +1,8 @@ | ||
var total = 0; | ||
var limit = 10; | ||
var total = 0; | ||
for (var i=0; i<=limit; i++) { | ||
for (var i = 0; i < limit; i++) { | ||
total += i; | ||
console.log(total) | ||
} | ||
console.log(total) |
var fruit = 'orange'; | ||
if(fruit.length > 5 ) { | ||
if (fruit.length > 5) { | ||
console.log('The fruit name has more than five characters.'); | ||
} else { | ||
console.log('The fruit name has less or equal than five characters.'); | ||
console.log('The fruit name has five characters or less.'); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
886027
415
25