Javascript Problem - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Javascript Problem (1153 Views)
| Javascript Problem by africanman85(op): 12:27am On Sep 11, 2021 |
Function calcTip(bill) If (bill >=50 && bill <= 300 ) { return ( bill * 0.15 ) }else{ return ( bill * 0.20 ) Console.log(calcTip (275) ) Pls what am I doing wrong here ? Getting errors |
| Re: Javascript Problem by QuantumR: 1:57am On Sep 11, 2021 |
africanman85:function calcTip (bill) { if( bill >=50 && bill <= 300) { return (bill * 0.15) }else { return (bill * 0.20) } } |
| Re: Javascript Problem by LikeAking: 3:00am On Sep 11, 2021*. Modified: 5:34pm On Sep 11, 2021 |
africanman85:the return 9 b d P. no brackets <- like this |
| Re: Javascript Problem by africanman85(op): 7:30am On Sep 11, 2021 |
LikeAking:I didn't get u |
| Re: Javascript Problem by Jas80: 7:59am On Sep 11, 2021 |
You didn't close the brace b4 using console.log Good morning |
| Re: Javascript Problem by KVNGQ: 9:40am On Sep 11, 2021 |
africanman85:So the error is probably because of the curly bracket before the else
|
| Re: Javascript Problem by Nobody: 12:05pm On Sep 11, 2021 |
KVNGQ:No curly brackets in your if else statements |
| Re: Javascript Problem by LikeAking: 4:37pm On Sep 11, 2021*. Modified: 5:38pm On Sep 11, 2021 |
africanman85:somebody as given you an answer in pics Mine function calcTip(bill){ if (bill >=50 && bill <= 300 ) { return bill * 0.15 }else{ return bill * 0.20 } } console.log(calcTip (275)) |
| Re: Javascript Problem by Brightale(f): 10:29pm On Sep 11, 2021 |
KVNGQ:apart from the missing curly bracket, there should be space after the second return too |
| Re: Javascript Problem by africanman85(op): 10:34pm On Sep 11, 2021 |
Brightale:I don't think so |
| Re: Javascript Problem by Capslock01: 11:26pm On Sep 11, 2021 |
Brightale:With or without space, it'll still run. The issue with his code was not having curly bracket set. |
| Re: Javascript Problem by bet9ja(m): 5:41pm On Sep 16, 2021 |
Capslock01:Javascript is not python. She doesn't complain about space and semi columns. The ops missed out on closing the curly bracket |
| Re: Javascript Problem by Mrceejay: 11:55pm On Sep 16, 2021 |
Senior Java Engineer - Number of opening - 1 Stack: Java & SQL and ORM, AWS Cloud& experience in Oracle, and MySQL, PostgreSQL Years of experience: 5 (Minimum) - 8 (Maximum) years professional experience Location: Hybrid Salary 600,000 - 800,000 Naira Monthly 2. Senior DevOps Engineer Number of Opening: 1 Stack: AWS & Digital Ocean & Linux and scripting languages like BASH, Python Years of experience: 5(Minimum)- 7(Maximum) years of professional experience Location: Remote Salary: 600,000 - 800,000 Naira monthly 3. React Native Developer - Mobile Number of opening: 1 Stack: JavaScript & React & Node and TypeScript language and its nuances, including ES6+ syntax Years of experience: 3(Minimum)- 5(Maximum) years of professional experience Location: Hybrid Salary: 400,000 - 600,000 Naira monthly 4.Senior Full-Stack Engineer Number of opening: 2 Stack: (C#, .net, Java, must have); PHP, Javascript, React.js, Vue.js Years of experience: 4(Minimum)- 8(Maximum) years of professional experience Location: Remote Salary: 800,000-1,200,000 Naira monthly 5. Senior Backend Engineer - Number of opening - 2 Stack: Java and Javascript/Node Js (must-have); TDD; Docker and CI/CD tool; AWS Years of experience: 5 (Minimum)- 7(Maximum) professional experience Location: Remote Salary 800,000 Naira Monthly 6. Engineering Manager (Middle-level to Senior)- Number of opening - 1 Stack: PHP/Laravel; Vuejs/Nuxtjs; Tailwindcsss Years of experience: 3 (Minimum)- 6(Maximum) professional experience Location: Hybrid Salary : 900,000 Naira Monthly 7. Tech Lead (Senior Backend Engineer)- Number of opening - 1 Stack: Nodejs & MongoDB & AWS & Excellent leadership & managerial skills Years of experience: 6 years of professional experience Location: In Office Salary : 1,000,000 Naira Monthly Please contact me if you are qualified or know anyone who is In case you belong to any group of developers too, kindly let me know.. |
| Re: Javascript Problem by Mrceejay: 11:55pm On Sep 16, 2021 |
Senior Java Engineer - Number of opening - 1 Stack: Java & SQL and ORM, AWS Cloud& experience in Oracle, and MySQL, PostgreSQL Years of experience: 5 (Minimum) - 8 (Maximum) years professional experience Location: Hybrid Salary 600,000 - 800,000 Naira Monthly 2. Senior DevOps Engineer Number of Opening: 1 Stack: AWS & Digital Ocean & Linux and scripting languages like BASH, Python Years of experience: 5(Minimum)- 7(Maximum) years of professional experience Location: Remote Salary: 600,000 - 800,000 Naira monthly 3. React Native Developer - Mobile Number of opening: 1 Stack: JavaScript & React & Node and TypeScript language and its nuances, including ES6+ syntax Years of experience: 3(Minimum)- 5(Maximum) years of professional experience Location: Hybrid Salary: 400,000 - 600,000 Naira monthly 4.Senior Full-Stack Engineer Number of opening: 2 Stack: (C#, .net, Java, must have); PHP, Javascript, React.js, Vue.js Years of experience: 4(Minimum)- 8(Maximum) years of professional experience Location: Remote Salary: 800,000-1,200,000 Naira monthly 5. Senior Backend Engineer - Number of opening - 2 Stack: Java and Javascript/Node Js (must-have); TDD; Docker and CI/CD tool; AWS Years of experience: 5 (Minimum)- 7(Maximum) professional experience Location: Remote Salary 800,000 Naira Monthly 6. Engineering Manager (Middle-level to Senior)- Number of opening - 1 Stack: PHP/Laravel; Vuejs/Nuxtjs; Tailwindcsss Years of experience: 3 (Minimum)- 6(Maximum) professional experience Location: Hybrid Salary : 900,000 Naira Monthly 7. Tech Lead (Senior Backend Engineer)- Number of opening - 1 Stack: Nodejs & MongoDB & AWS & Excellent leadership & managerial skills Years of experience: 6 years of professional experience Location: In Office Salary : 1,000,000 Naira Monthly Please contact me if you are qualified or know anyone who is In case you belong to any group of developers too, kindly let me know.. |
HELP With This Javascript Problem • Help, Javascript Problem, (pictures Attached) (fixed) • Help Me With This Javascript Problem • 2 • 3 • 4
Is It Too Late To Start A Tech Career In My 30s With Flutter? • Recommend Vb.net Textbook • Would You End Up Needing Glasses?