Question: javascript Find and print all the digits from the sentence as a single array. If the sentence has no digits, print No digits!. Try to
javascript
Find and print all the digits from the sentence as a single array. If the sentence has no digits, print "No digits!". Try to do the check using the test()-method.
Example output:
5,3,1,7,3,0,5,5,1,9,3,5
code given:
var sentence ="5om3 wr173 w0rd5 u51n9 numb3r5."
function printDigits() {
### put your code here ###
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
