Cannot figure this out Re: intro 7/9 JavaScript


#1

In introduction to JavaScript section 7/9 there is a math.random section that needs to be input with math.floor to be a rounded number. Here’s what I’ve input and keep getting an error code. Please advise as to where the issue is. Thanks

console.log(Math.floor(Math.random() * 100);

Error code reads as follows:
/home/ccuser/workspace/learn-javascript-intro-javascript-libraries-v2/app.js:1
(function (exports, require, module, __filename, __dirname) { console.log(Math.floor (Math.random() * 100);
^
SyntaxError: missing ) after argument list
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions…js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)
at startup (bootstrap_node.js:151:9)


#2

Count the brackets. There is an odd number. That tells you one is missing.


#3

ahh that makes sense. thank you


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.