SnIPPETsX › num=[1,2,3,4,5,6]
num=[1,2,3,4,5,6]
JavaScript · updated Oct 14, 2026 · 3 lines
main.js
num=[1,2,3,4,5,6]
y=[x for x in num if x%2==1]
print("The odd numbers in",num,":",y)
Run this JavaScript snippet
Open this snippet on SnIPPETsX to run the JavaScript code in your browser, edit it together with others in real time, or fork it into your own copy. No install or account is needed.