bloominstituteoftechnology/Precourse

Inability to use not (!) operator in code

aellis77 opened this issue · 1 comments

Using the ! operator works okay on new projects I've created in VS Code, but on the homework it results in the following error :

c:\Users\aelli\LambdaSchool\Precourse\Lesson04-JS-I\homework\homework.js:107
if !(num%2 === 0) {
^
SyntaxError: Unexpected token !
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
Waiting for the debugger to disconnect...
SyntaxError: Unexpected token !
vm.js:80
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3

Syntax error.
Example would be if (!(x === y)) {