SlideShare a Scribd company logo
1 of 1
Download to read offline
question: (javascript) - have the function stringchallenge(num) take the num parameter being
passed and return all the numbers from 1 to num seperated by spaces, but replace every number
that is divisible by 3 with the word "Fizz", replace every number that is divisible by 3 with the
word "Buzz", and every number that is divisible by both 3 and 5 with the word "FizzBuzz".
String Challenge Have the function 16 , then your program should return the string "1 2 Fizz 4
Buzz Fizz 78 Fizz Buzz 11 Fizz 1314 FizzBuzz 16". The input will be within the range 1 - 50 .
Examples Input: 3 Output: 12 Fizz Input: 8 Output: 12Fizz4 Buzz Fizz 78

More Related Content

More from agmobiles

Put this in APA format Add information if needed.CONSTRUCTION.pdf
Put this in APA format Add information if needed.CONSTRUCTION.pdfPut this in APA format Add information if needed.CONSTRUCTION.pdf
Put this in APA format Add information if needed.CONSTRUCTION.pdf
agmobiles
 
Provide logical case studies where the application of the following .pdf
Provide logical case studies where the application of the following .pdfProvide logical case studies where the application of the following .pdf
Provide logical case studies where the application of the following .pdf
agmobiles
 
public class AVLTreeT extends ComparableT extends BSTT { p.pdf
public class AVLTreeT extends ComparableT extends BSTT {   p.pdfpublic class AVLTreeT extends ComparableT extends BSTT {   p.pdf
public class AVLTreeT extends ComparableT extends BSTT { p.pdf
agmobiles
 
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdf
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdfProject Bird speciesThe OrdwayBirds data frame is a historical re.pdf
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdf
agmobiles
 
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdfProductos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
agmobiles
 
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdfPreguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
agmobiles
 
Problem Salem and Durham entered into a partnership to provide sup.pdf
Problem Salem and Durham entered into a partnership to provide sup.pdfProblem Salem and Durham entered into a partnership to provide sup.pdf
Problem Salem and Durham entered into a partnership to provide sup.pdf
agmobiles
 
Problem 4After 25 years of operations, the Dennison, Edwards, and .pdf
Problem 4After 25 years of operations, the Dennison, Edwards, and .pdfProblem 4After 25 years of operations, the Dennison, Edwards, and .pdf
Problem 4After 25 years of operations, the Dennison, Edwards, and .pdf
agmobiles
 
Principles of ManagementManagerial Decision Making2.1 What are.pdf
Principles of ManagementManagerial Decision Making2.1 What are.pdfPrinciples of ManagementManagerial Decision Making2.1 What are.pdf
Principles of ManagementManagerial Decision Making2.1 What are.pdf
agmobiles
 

More from agmobiles (20)

Put this in APA format Add information if needed.CONSTRUCTION.pdf
Put this in APA format Add information if needed.CONSTRUCTION.pdfPut this in APA format Add information if needed.CONSTRUCTION.pdf
Put this in APA format Add information if needed.CONSTRUCTION.pdf
 
Proyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdf
Proyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdfProyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdf
Proyecto EH! requiere una inversi�n inicial de $50 000 y tiene un va.pdf
 
Provide logical case studies where the application of the following .pdf
Provide logical case studies where the application of the following .pdfProvide logical case studies where the application of the following .pdf
Provide logical case studies where the application of the following .pdf
 
public class AVLTreeT extends ComparableT extends BSTT { p.pdf
public class AVLTreeT extends ComparableT extends BSTT {   p.pdfpublic class AVLTreeT extends ComparableT extends BSTT {   p.pdf
public class AVLTreeT extends ComparableT extends BSTT { p.pdf
 
Provide excel work, spider-plot, and tornado diagram. Opportunit.pdf
Provide excel work, spider-plot, and tornado diagram. Opportunit.pdfProvide excel work, spider-plot, and tornado diagram. Opportunit.pdf
Provide excel work, spider-plot, and tornado diagram. Opportunit.pdf
 
Prove (i.e. give a derivation for) each of the following. You can us.pdf
Prove (i.e. give a derivation for) each of the following. You can us.pdfProve (i.e. give a derivation for) each of the following. You can us.pdf
Prove (i.e. give a derivation for) each of the following. You can us.pdf
 
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdf
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdfProject Bird speciesThe OrdwayBirds data frame is a historical re.pdf
Project Bird speciesThe OrdwayBirds data frame is a historical re.pdf
 
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdfProductos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
Productos de ingenier�a matrimonial Cynthia Gao, gerente de adqu.pdf
 
Process Cost SystemsWhat type of product or business would use a p.pdf
Process Cost SystemsWhat type of product or business would use a p.pdfProcess Cost SystemsWhat type of product or business would use a p.pdf
Process Cost SystemsWhat type of product or business would use a p.pdf
 
programming assignment 2Preprocessing Before building the language.pdf
programming assignment 2Preprocessing Before building the language.pdfprogramming assignment 2Preprocessing Before building the language.pdf
programming assignment 2Preprocessing Before building the language.pdf
 
Problema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdf
Problema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdfProblema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdf
Problema 4 Un monopolio se enfrenta a la demanda del mercado QD =.pdf
 
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdfPreguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
Preguntas para el ejercicio 34Instrucciones Para cada uno de los .pdf
 
Problem 9.06 (Preferred Stock Valuation)Farley Inc. has perpetual .pdf
Problem 9.06 (Preferred Stock Valuation)Farley Inc. has perpetual .pdfProblem 9.06 (Preferred Stock Valuation)Farley Inc. has perpetual .pdf
Problem 9.06 (Preferred Stock Valuation)Farley Inc. has perpetual .pdf
 
Problem Salem and Durham entered into a partnership to provide sup.pdf
Problem Salem and Durham entered into a partnership to provide sup.pdfProblem Salem and Durham entered into a partnership to provide sup.pdf
Problem Salem and Durham entered into a partnership to provide sup.pdf
 
Problem 7. Calculate the amortization table for a loan of 28,000 tha.pdf
Problem 7. Calculate the amortization table for a loan of 28,000 tha.pdfProblem 7. Calculate the amortization table for a loan of 28,000 tha.pdf
Problem 7. Calculate the amortization table for a loan of 28,000 tha.pdf
 
Problem 6. A worker in the United States wishes to work in that coun.pdf
Problem 6. A worker in the United States wishes to work in that coun.pdfProblem 6. A worker in the United States wishes to work in that coun.pdf
Problem 6. A worker in the United States wishes to work in that coun.pdf
 
Problem 4After 25 years of operations, the Dennison, Edwards, and .pdf
Problem 4After 25 years of operations, the Dennison, Edwards, and .pdfProblem 4After 25 years of operations, the Dennison, Edwards, and .pdf
Problem 4After 25 years of operations, the Dennison, Edwards, and .pdf
 
Primavera holdings has a profit margin of 25, an asset turnover of .pdf
Primavera holdings has a profit margin of 25, an asset turnover of .pdfPrimavera holdings has a profit margin of 25, an asset turnover of .pdf
Primavera holdings has a profit margin of 25, an asset turnover of .pdf
 
Presentation slide and transcript The scenario - present in the B.pdf
Presentation slide and transcript The scenario - present in the B.pdfPresentation slide and transcript The scenario - present in the B.pdf
Presentation slide and transcript The scenario - present in the B.pdf
 
Principles of ManagementManagerial Decision Making2.1 What are.pdf
Principles of ManagementManagerial Decision Making2.1 What are.pdfPrinciples of ManagementManagerial Decision Making2.1 What are.pdf
Principles of ManagementManagerial Decision Making2.1 What are.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 

question (javascript) - have the function stringchallenge(num) .pdf

  • 1. question: (javascript) - have the function stringchallenge(num) take the num parameter being passed and return all the numbers from 1 to num seperated by spaces, but replace every number that is divisible by 3 with the word "Fizz", replace every number that is divisible by 3 with the word "Buzz", and every number that is divisible by both 3 and 5 with the word "FizzBuzz". String Challenge Have the function 16 , then your program should return the string "1 2 Fizz 4 Buzz Fizz 78 Fizz Buzz 11 Fizz 1314 FizzBuzz 16". The input will be within the range 1 - 50 . Examples Input: 3 Output: 12 Fizz Input: 8 Output: 12Fizz4 Buzz Fizz 78